25.01.2013, 21:31
How can I make this into a strcmp command AND DON'T ASK why I want it to be like that. Thank you.
Код:
dcmd_setscore(playerid,params[]){ if (PlayerInfo[playerid][level] <3 && IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid,COLOR_RED,"You need to be a full administrator to use this command!"); new id,val,string[128]; if (sscanf(params,"ii",id,val)) return SendClientMessage(playerid,COLOR_GREEN,"Usage: /setscore [playerid] [value]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player is not connected"); if(playerid == id) return SendClientMessage(playerid,COLOR_RED,"Don't abuse"); SetPlayerScore(id,val); new pName[MAX_PLAYER_NAME]; new vName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,32); GetPlayerName(id,vName,32); format(string,sizeof string,"{FF0A00}-[Administrator: %s]- {FFFFFF}changed %s's score to %i.",pName,vName,val); SendClientMessageToAll(COLOR_GRAY,string); return 1; }