01.04.2013, 20:55
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/setscore", true))
{
if(!IsPlayerAdmin) return 0;
new tmp[128];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /setscore [ID] [SCORE]");
if(!IsPlayerConnected(tmp)) return SendClientMessage(playerid,-1,"Player not found.");
new id = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /setscore [ID] [SCORE]");
SetPlayerScore(id,tmp);
return 1;
}
return 0;
}
Like this?