help with /kick and /ban
#8

Quote:
Originally Posted by NaziHotdog
Посмотреть сообщение
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.
my script:

Код:
#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;
}
8th line is here:
Код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "Admins only.");
I have so many includes just in case.My register system in y_ini works just fine.
Change PlayerInfo to your enum admin stats and try that for example i use this
pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pKills,
    pDeaths,
    pAdminLevel
}
new PlayerInfo[MAX_PLAYERS][pInfo]; // so my enum uses PlayerInfo[playerid][pAdminLevel]
And edit that...
pawn Код:
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1, "Admins only.");
Reply


Messages In This Thread
help with /kick and /ban - by NaziHotdog - 19.10.2013, 17:50
Re: help with /kick and /ban - by Akira297 - 19.10.2013, 17:56
Re: help with /kick and /ban - by DanishHaq - 19.10.2013, 17:59
Re: help with /kick and /ban - by NaziHotdog - 19.10.2013, 18:06
Re: help with /kick and /ban - by DanishHaq - 19.10.2013, 18:11
Re: help with /kick and /ban - by NaziHotdog - 19.10.2013, 18:32
Re: help with /kick and /ban - by DanishHaq - 19.10.2013, 19:17
Re: help with /kick and /ban - by SilentSoul - 19.10.2013, 19:19
Re: help with /kick and /ban - by NaziHotdog - 19.10.2013, 19:37

Forum Jump:


Users browsing this thread: 1 Guest(s)