13.06.2012, 22:52
pawn Код:
if(sscanf(params, "is[24]", targetid))
If you want the command layout like.
Код:
/makeleader [playerid/PartOfName]
pawn Код:
COMMAND:makeleader(playerid, params[])
{
if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "[SYNTAX]: /makeleader [PlayerID/PartOfName]");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid,WHITE,"[ERROR] Player Is Not Connected");
else
{
SendClientMessage(targetid,COLOR_GREEN, "You have been made a faction leader!");
FactionLeader[targetid] += 1;
}
return 1;
}