13.07.2012, 12:39
Quote:
|
okay okay i started use zcmd and sscanf and givemoney problem sloved
now another problem with zcmd and sscanf look in it pawn Code:
its okay no compile errors just when i enter server i do /akill 0 blabla" its send me message "usage : /akill plaerid reason and if i do "akill 0 0" its send me message "admin killed u reason : 0" only if akill 0 0 its working why? |
pawn Code:
CMD:akill(playerid, params[])
{
new pID, aName[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME], Reason[128], string[256];
if(PlayerInfo[playerid][pAdmin] >= 3)
if(sscanf(params,"us",pID, Reason)) return SendClientMessage(playerid,COLOR_WHITE,"[CMD]:/akill [PlayerID] [Reason]");
else if (pID==INVALID_PLAYER_ID)SendClientMessage(playerid,red,"[ERROR]:Player not Found!");
else
{
GetPlayerName(playerid,aName,sizeof(aName));
GetPlayerName(pID,pName,sizeof(pName));
format(string, sizeof(string),"* Admin %s has Admin Killed %s (Reason: %s) *",aName, pName, Reason);
SendClientMessage(playerid,red,string);
SetPlayerHealth(pID,0);
}
else return SendClientMessage(playerid, red, "[ERROR]:You need to be an Admin to Access this Commands!");
return 1;
}


