De bele lehet rakni igy:
Tessék rakjd FS-be
[pawn]if(strcmp(cmd, \"/setscore\", true) == 0)
{
new sendername[MAX_PLAYER_NAME];
new tmp[256];
new tmp2[256];
tmp = strtok(cmdtext, idx);
new givenplayer = strval(tmp);
tmp2 = strtok(cmdtext, idx);
new score = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, \"Használat: /setscore [playerid] [score]\");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, \"Invaild player ID!\");
SetPlayerScore(givenplayer,score);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), \"Admin \\\"%s\\\" átálitottad a score-at %d!\", sendername, score);
SendClientMessage(otherplayer, COLOR_GREEN, string);
return 1;
} [/pawn]
vagy ez ZCMD
[pawn]COMMAND:setscore(playerid, params[])
{
new string[128], pName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], pID, score;
if(sscanf(params, \"ud\", pID, score)) return SendClientMessage(playerid, -1, \"Használat: /setscore <playerid> <score>\");
if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"A játékos nincs fent\");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(pID, pName, sizeof(pName));
format(string, sizeof(string), \"%s átálitotta a pontodat erre %d \", name, score);
SendClientMessage(pID, -1, string);
format(string, sizeof(string), \"Te átállitottad %d -re %s pontját.\", score, pName);
SendClientMessage(playerid, -1, string);
SetPlayerScore(pID, score);
return 1;
}[/pawn]
Ha segitettem +