21.01.2013, 16:32
Start using ZCMD its now or never.
pawn Код:
CMD:sethuman(playerid, params[])
{
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(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "{FF8000}/SetHuman {FF0000}[PlayerID/PartOfName]");
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;
}