HELP! +REP
#8

So I've got ZCMD.
I have this pawn code so far with my admin system:
pawn Код:
CMD:setadmin(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))return 0;
    if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /setadmin [ID] [Level 1-4]");
    if(levels > 5) return SendClientMessage(playerid,0xFF0000FF,"LEVELS AVAILABLE 1-5!");
    if(!IsPlayerConnected(ID))return SendClientMessage(playerid,red,"That user is not currently connected.");
    if(PlayerData[ID][AdminLevel] == levels) return SendClientMessage(playerid,0xFF0000FF, "ERROR: That user is already that level!");
    GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);
    GetPlayerName(ID,pname,MAX_PLAYER_NAME);
    if(levels == 0)
    {
        format(str, sizeof(str),"%s has changed your Admin level to %d on the server.",Nam,levels);
        SendClientMessage(ID,0xFF9900AA,str);
        format(str, sizeof(str),"You had set %s Admin level to %d!",pname,levels);
        SendClientMessage(playerid,0xFF9900AA,str);
        PlayerData[ID][AdminLevel] = levels;
        return 1;
    }
    format(str, sizeof(str),"%s has changed your Admin level to %d on the server.",Nam,levels);
    SendClientMessage(ID,0xFF9900AA,str);
    format(str, sizeof(str),"You had set %s Admin level to %d!",pname,levels);
    SendClientMessage(playerid,0xFF9900AA,str);
    PlayerData[ID][AdminLevel] = levels;
    return 1;
}
CMD:akill(playerid,params[])
{
    if(PlayerData[playerid][AdminLevel] < 1) return 0;
    if(sscanf(params,"u",ID)) return SendClientMessage(playerid,grey,"USAGE: /akill [playerid / Partofname]");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,red,"ERROR: That user is not currently connected!");
    GetPlayerName(playerid,Nam,sizeof(Nam));
    GetPlayerName(ID,pname,sizeof(pname));
    format(str,sizeof(str),"Administrator %s has been killed by an admin.",Nam);
    SendClientMessage(ID,orange,str);
    format(str,sizeof(str),"You have admin killed %s",pname);
    SendClientMessage(playerid,orange,str);
    SetPlayerHealth(ID,0);
    return 1;
}
Comiler states that there is errors:
Код:
C:\Users\Zach\Desktop\PAWNO\filterscripts\DJTAS.pwn(22) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Zach\Desktop\PAWNO\filterscripts\DJTAS.pwn(23) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Users\Zach\Desktop\PAWNO\filterscripts\DJTAS.pwn(288) : warning 203: symbol is never used: "akill"
C:\Users\Zach\Desktop\PAWNO\filterscripts\DJTAS.pwn(288) : warning 203: symbol is never used: "setadmin"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply


Messages In This Thread
HELP! +REP - by DJTunes - 03.01.2013, 18:07
Re: HELP! +REP - by Patrick - 03.01.2013, 18:12
Re : HELP! +REP - by DaRk_RaiN - 03.01.2013, 18:14
Re: Re : HELP! +REP - by DJTunes - 03.01.2013, 18:18
Re: HELP! +REP - by DJTunes - 03.01.2013, 18:20
Re: HELP! +REP - by Konstantinos - 03.01.2013, 18:23
Re: HELP! +REP - by DJTunes - 03.01.2013, 18:28
Re: HELP! +REP - by DJTunes - 03.01.2013, 19:08
Re: HELP! +REP - by Konstantinos - 03.01.2013, 21:06
Re: HELP! +REP - by Chrillzen - 03.01.2013, 21:12

Forum Jump:


Users browsing this thread: 1 Guest(s)