26.02.2011, 07:55
Thanks for anwser, but I still have the problem...
...Gamemode.pwn(426) : error 033: array must be indexed (variable "level")
...Gamemode.pwn(429) : error 006: must be assigned to an array
...Gamemode.pwn(430) : error 035: argument type mismatch (argument 3)
...Gamemode.pwn(426) : error 033: array must be indexed (variable "level")
...Gamemode.pwn(429) : error 006: must be assigned to an array
...Gamemode.pwn(430) : error 035: argument type mismatch (argument 3)
Код:
dcmd_setlevel(playerid,params[]) { if(level[playerid] >= 5) { new playerid2, string[128]; if(sscanf(params, "ud", playerid2, level)) { if(IsPlayerConnected(playerid2)) { if(level >= 6) { new playerfile[128]; level[playerid] = level; dini_IntSet(playerfile,"Level",level); format(string,sizeof(string),"You have set %s's Administrator Level to %d!",GetName(playerid2),level); SendClientMessage(playerid,red,string); format(string,sizeof(string),"Administrator %s has set your Administrator Level to %d!",GetName(playerid),level); SendClientMessage(playerid2,red,string); } else return SendClientMessage(playerid,red,"ERROR: You cannot set higher Administrator Level than 5!"); } else return SendClientMessage(playerid,red,"ERROR: Player is not connected!"); } else return SendClientMessage(playerid,red,"USAGE: /setlevel [playerid] [level]"); } else return SendClientMessage(playerid,red,"ERROR: Only Admins with level 5 can use this command!"); return 1; }