30.10.2012, 21:00
You mean this ?
Код:
COMMAND:sharescore(playerid, params[]) { new pid, score; if(sscanf(params, "us", pid, score)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /sharescore <playerid> <score>"); // if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "This command is only for admins."); new string[128], pName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerName(pID, sName, sizeof(sName)); format(string, sizeof(string), "Player %s has shared %d XP to Player %s", pName, score, sName); SendClientMessageToAll(/*your color*/ -1, string); SetPVarInt(pID, "XP", GetPVarInt(pID, "XP") + score); }