21.01.2013, 16:17
Hello,i'm having a problem with my /sethuman command on my script, it doesn't seem to actually set the playerid i'm trying to make it! anyone know how to fix this?
Regards
Oscii
pawn Код:
if (strcmp("/sethuman", cmdtext, true) == 0)
{
if(PlayerInfo[playerid][jAdmin] < 3) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!");//Checking if the player has admin level 3, if not it sends him a message.
new targetid;
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player not connected!");
else
{
format(string, sizeof(string), "%s has set you to human.", PlayerName(playerid));
SendClientMessage(targetid, BLANCO, string);
gTeam[targetid] = EHUMAN;
HumanTeamCambia(targetid);
PlayerInfo[targetid][jZombie] = 0;
PlayerInfo[targetid][jInfected] = 0;
}
return 1;
}
Oscii