07.10.2013, 00:07
How would I make the following code into a offline make admin system?
Код:
if(!strcmp(cmdtext[1],"makeadmin",true,9)){ if(!IsPlayerAdmin(playerid)||PlayerInfo[playerid][AdminLevel]<5)return SendClientMessage(playerid,0xFF00FF),"You're not authorized to use that command"); new tmpspace = strfind(cmdtext," ",true,11); if(!cmdtext[11])return SendClientMessage(playerid,0xFF0000FF,"USAGE: /MakeAdmin <playerid> <admin level>"); if(!cmdtext[tmpspace+1])return SendClientMessage(playerid,0xFF0000FF,"USAGE: /MakeAdmin <playerid> <admin level>"); PlayerInfo[strval(cmdtext[11])][AdminLevel]=strval(cmdtext[tmpspace+1]); new tmpstring[128]; GetPlayerName(strval(cmdtext[11]),tmpstring,MAX_PLAYER_NAME); format(tmpstring,128,"You made %s AdminLevel %d",tmpstring,strval(cmdtext[tmpspace+1])); SendClientMessage(playerid,0xFFFFFFFF,tmpstring); GetPlayerName(playerid,tmpstring,MAX_PLAYER_NAME); format(tmpstring,128,"%s made you AdminLevel %d",tmpstring,strval(cmdtext[tmpspace+1])); return SendClientMessage(strval(cmdtext[11]),0xFFFFFFFF,tmpstring);}