14.12.2012, 04:24
Код:
CMD:setlevel(playerid, params[]) { new str[128], id, alevel; new AdminRank[60]; if(PlayerInfo[playerid][pAdmin] >= 10 || IsPlayerAdmin(playerid)) { if(sscanf(params, "ui", id, alevel)) return SendClientMessage(playerid, COL_RED, "Syntax: /setlevel (id) (level)"); if(alevel > 9 || alevel < 0) return SendClientMessage(playerid, COL_RED, "Admin Maxium (Left): 0 - Maxium (Right): 9"); if(alevel == PlayerInfo[id][pAdmin]) return SendClientMessage(playerid, COL_RED, "Error: That player is already in that admin level!"); if(PlayerInfo[id][pAdmin] > alevel) GameTextForPlayer(id, "~r~Demoted", 3000, 3); if(PlayerInfo[id][pAdmin] < alevel) GameTextForPlayer(id, "~g~Promoted", 3000, 3); switch(alevel) { case 0: AdminRank = "Player"; case 1: AdminRank = "Helping Hand"; case 2: AdminRank = "Mini-Moderator"; case 3: AdminRank = "Moderator"; case 4: AdminRank = "Super Moderator"; case 5: AdminRank = "Administrator"; case 6: AdminRank = "Head Administrator"; case 7: AdminRank = "Lead Administrator"; case 8: AdminRank = "Assistant Director"; case 9: AdminRank = "Director"; case 10: AdminRank = "Executive Director"; } PlayerInfo[id][pAdmin] = alevel; format(str, sizeof(str), "You set %s(%d) Admin Level to %d - %s", GetName(id), id, alevel, AdminRank); SendClientMessage(playerid, COL_GREEN, str); format(str, sizeof(str), "Administrator %s(%d) has set your Admin Level to %d - %s", GetName(playerid), playerid, alevel, AdminRank); SendClientMessage(id, COL_GREEN, str); } return 1; }
Код:
I:\San Andreas Multiplayer Server Files (Classified)\Server\filterscripts\CI-RP_Filterscript.pwn(394) : error 035: argument type mismatch (argument 2) I:\San Andreas Multiplayer Server Files (Classified)\Server\filterscripts\CI-RP_Filterscript.pwn(395) : error 035: argument type mismatch (argument 2) I:\San Andreas Multiplayer Server Files (Classified)\Server\filterscripts\CI-RP_Filterscript.pwn(396) : error 035: argument type mismatch (argument 2) I:\San Andreas Multiplayer Server Files (Classified)\Server\filterscripts\CI-RP_Filterscript.pwn(415) : error 035: argument type mismatch (argument 2) I:\San Andreas Multiplayer Server Files (Classified)\Server\filterscripts\CI-RP_Filterscript.pwn(417) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.