08.12.2010, 23:17
pawn Код:
if(strcmp(cmd, "/addscore", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /addscore [playerid]");
if(IsPlayerConnected(strval(tmp)))
{
new score = GetPlayerScore(strval(tmp));
SetPlayerScore(strval(tmp),score+1);
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s added 1 score extra to your account.",name);
SendClientMessage(strval(tmp), 0xFFFF00AA, string);
}
return 1;
}