Here is my code:
function serverCmdFlashKill(%client,%input)
{
if(%client.isSuperAdmin)
{
%targ = findClientByName(%input);
%targ.player.setwhiteout("9");
%targ.player.setVelocity("0 0 10");
%targ.player.kill();
%client.chatMessage("\c4You have flash killed \c3"@%targ.name@"\c4.");
}
else
{
%client.chatMessage("You must be an admin to do this command!");
}
if(!isObject(%targ.player))
{
%client.chatMessage("The player hasn't spawned yet!");
}
}
What I am trying to do is make it so that it tells whether or not they exist or
have/haven't spawned. Whenever I look at another code I just get really confused
and decide it's not worth trying to figure it out just by looking at it. Can anyone
help me out?
EDIT:
Oh, sorry for not mentioning what happens when I try this code:
It kills the player, but then it also says that the player doesn't exist.