07.05.2012, 18:56
hello, im making a zombie game mode and i need a easy setteam command like /sethuman and /setzombie
i got the sscanf and zcmd thingy's but i just dont know how to handle those. it needs to look something like this : ( i used the lines of a kick command lol just to try but when i try the command on somwan else it just sets my team again!.
i got the sscanf and zcmd thingy's but i just dont know how to handle those. it needs to look something like this : ( i used the lines of a kick command lol just to try but when i try the command on somwan else it just sets my team again!.
pawn Код:
COMMAND:setzombie(playerid,params[])
{
new id,reason[80];
if(PlayerInfo[playerid][pAdminLevel] <1) return SendClientMessage(playerid,COLOR_RED,"You're not allowed to use this");
if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/setzombie [playerid] [reason]");
SendClientMessage(id,COLOR_RED,"Your team has been set to Zombie by an Admin.");
SetPlayerPos(playerid, -2089.0293, -2342.6353, 30.6250);
SetPlayerSkin(playerid, 162);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 9, 1);
return 1;
}