19.10.2013, 19:19
Quote:
Now,I get this:
Код:
C:\Users\Kompas\Desktop\fag\filterscripts\admin.pwn(8) : error 017: undefined symbol "PlayerInfo" C:\Users\Kompas\Desktop\fag\filterscripts\admin.pwn(8) : warning 215: expression has no effect C:\Users\Kompas\Desktop\fag\filterscripts\admin.pwn(8) : error 001: expected token: ";", but found "]" C:\Users\Kompas\Desktop\fag\filterscripts\admin.pwn(8) : error 029: invalid expression, assumed zero C:\Users\Kompas\Desktop\fag\filterscripts\admin.pwn(8) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. Код:
#include <a_samp> #include <zcmd> #include <sscanf2> #include <YSI\y_ini> CMD:kick(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "Admins only."); new targetid; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Syntax: /kick [playerid/name]"); Kick(targetid); return 1; } Код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "Admins only."); |
pawn Код:
enum pInfo
{
pPass,
pCash,
pKills,
pDeaths,
pAdminLevel
}
new PlayerInfo[MAX_PLAYERS][pInfo]; // so my enum uses PlayerInfo[playerid][pAdminLevel]
pawn Код:
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1, "Admins only.");