First the error:
with this code, when I execute a command, it says Unknow command and Player not found, but the code is executed, for my case it gives me the error I said, but mobs spawned.
Now the question:
Is there any way of set a player on fire?
I searched in API.txt and I con't find anything to to that.
with this code, when I execute a command, it says Unknow command and Player not found, but the code is executed, for my case it gives me the error I said, but mobs spawned.
Code:
function HandleApocalypseCommand( Split, Player )
local HasSpawned = false;
local KillPlayer = function(OtherPlayer)
if (OtherPlayer:GetName() == Split[2]) then
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 50 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 50 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 95 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 95 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 52 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 52 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 57 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 51 );
OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 54 );
HasSpawned = true;
end
end
local dowithplayer = function(OtherPlayer)
end
cRoot:Get():FindAndDoWithPlayer(Split[2], KillPlayer);
if (HasKilled) then
Player:SendMessage( "You're causing the die of ..Split[2]..!");
else
Player:SendMessage( "Player not found" );
end
if Split[2] == nil then
Player:SendMessage( cChatColor.Green .. "Usage: /creeper [Player]" )
return true
end
end
Now the question:
Is there any way of set a player on fire?
I searched in API.txt and I con't find anything to to that.