24.02.2014, 18:40
It's /givescore command i made it for admins only.
when admin use /givescore it give score to id 0 only even if id 0 not the requirement id.
the code:
when admin use /givescore it give score to id 0 only even if id 0 not the requirement id.
the code:
Код:
CMD:givescore(playerid, params[]) { if(PlayerInfo[playerid][Level] >= 4) { new giveplayerid, amount, gscore = GetPlayerScore(playerid); if(sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /givescore [playerid/partname] [amount]"); else if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player not found"); else if(amount > gscore) return SendClientMessage(playerid, 0xFF0000AA, "ERROE:Unknown Score"); { SetPlayerScore(giveplayerid,GetPlayerScore(giveplayerid) + amount); SendClientMessage(playerid, 0x00FF00AA, "Score Sent"); SendClientMessage(giveplayerid, 0x00FF00AA, "You Recieved Scores From an admin"); } if(PlayerInfo[playerid][Level] <= 4) { SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command"); } } return 1; }