|
|
@@ -202,7 +202,7 @@ <h2>Final example and conclusion</h2> |
|
|
if (#Split ~= 2) then
|
|
|
-- There was more or less than one argument (excluding the "/explode" bit)
|
|
|
-- Send the proper usage to the player and exit
|
|
|
SendMessage(Player, "Usage: /explode [playername]")
|
|
|
Player:SendMessage("Usage: /explode [playername]")
|
|
|
return true
|
|
|
end
|
|
|
|
|
|
@@ -213,7 +213,7 @@ <h2>Final example and conclusion</h2> |
|
|
if (Explodee:GetName() == Split[2]) then
|
|
|
-- Create an explosion at the same position as they are; see <a href="cWorld.html">API docs</a> for further details of this function
|
|
|
Player:GetWorld():DoExplosionAt(Explodee:GetPosX(), Explodee:GetPosY(), Explodee:GetPosZ(), false, esPlugin)
|
|
|
SendMessageSuccess(Player, Split[2] .. " was successfully exploded")
|
|
|
Player:SendMessageSuccess(Split[2] .. " was successfully exploded")
|
|
|
HasExploded = true;
|
|
|
return true -- Signalize to MCS that we do not need to call this callback for any more players
|
|
|
end
|
|
|
@@ -224,7 +224,7 @@ <h2>Final example and conclusion</h2> |
|
|
|
|
|
if not(HasExploded) then
|
|
|
-- We have not broken out so far, therefore, the player must not exist, send failure
|
|
|
SendMessageFailure(Player, Split[2] .. " was not found")
|
|
|
Player:SendMessageFailure(Split[2] .. " was not found")
|
|
|
end
|
|
|
|
|
|
return true
|
|
|
|
0 comments on commit
f6e0292