19.04.2018, 20:17
Not tested, try this.
Код:
CMD:set(playerid,params[]) { new string[128], giveplayerid, statcode, level; if(sscanf(params, "udd", giveplayerid, statcode, level)) { SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: /set [option]"); return SendClientMessage(playerid, 0xFFFFFFFF, "Available options: adminlevel"); } if(IsPlayerConnected(giveplayerid)) { switch (statcode) { case 1: { format(string,sizeof(string),"You gave %s(%i) admin level %i!",GetName(giveplayerid), giveplayerid, level); SendClientMessage(playerid,-1, string); PlayerInfo[giveplayerid][pAdmin] = level; } } return 1; }