01.06.2013, 05:41
Код:
CMD:set(playerid, params[]) { new string[128], id, option[3], targetid, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME]; new Input[64]; GetPlayerName(playerid, sendername,sizeof(sendername)); GetPlayerName(id, name,sizeof(name)); if(PlayerInfo[playerid][pAdmin] > 1) return SCM(playerid, COLOR_GREY, "unauthorized"); { if(sscanf(params, "uss", id, option, Input)) return SCM(playerid, COLOR_GREY, "Usage: /set [playerid] [1 = Rank | 2 = Agency] [Text]"); { if(!strcmp(option, "1", true)) { format(string,sizeof(string),"Admin %s set your rank to %s.", sendername, Input); SendClientMessage(id, COLOR_GREEN, string); PlayerInfo[id][pRank] = Input; } if(!strcmp(option, "2", true)) { format(string,sizeof(string),"Admin %s set your agency to %s.", sendername, Input); SendClientMessage(id, COLOR_GREEN, string); PlayerInfo[id][pAgency] = Input; } } } return 1; }
Код:
C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(4322) : error 006: must be assigned to an array C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(4328) : error 006: must be assigned to an array
Line 4322:
Код:
PlayerInfo[id][pRank] = Input;
Код:
PlayerInfo[id][pAgency] = Input;