Can someone help?
#1

Hello guys. I have a filterscript which spawns cars. I wish to make the command admin only. The script is as follows:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/burnsycar", true))
    {
        ShowPlayerDialog(playerid, Dialog, DIALOG_STYLE_LIST, "Car spawner", "Infernus\nTurismo\nPhoenix\nCheetah\nBanshee\nEuros\nBuffalo\nKart\nHotknife\nHustler\nComet\nStallion\nSunrise\nSandking", "Spawn", "Cancel");
        return 1;
    }
    return 0;
}
In my gamemode we define admins as the follows:

pawn Код:
if( Player[playerid][AdminLevel] >= 1 && Player[playerid][AdminDuty] > 0 )
Can someone tell me where to stick it in the script without getting errors like the below?

pawn Код:
C:\Users\Robert\Desktop\Grand Theft Auto San Andreas NEW\server\filterscripts\spawner.pwn(25) : error 017: undefined symbol "Player"
C:\Users\Robert\Desktop\Grand Theft Auto San Andreas NEW\server\filterscripts\spawner.pwn(25) : warning 215: expression has no effect
C:\Users\Robert\Desktop\Grand Theft Auto San Andreas NEW\server\filterscripts\spawner.pwn(25) : error 001: expected token: ";", but found "]"
C:\Users\Robert\Desktop\Grand Theft Auto San Andreas NEW\server\filterscripts\spawner.pwn(25) : error 029: invalid expression, assumed zero
C:\Users\Robert\Desktop\Grand Theft Auto San Andreas NEW\server\filterscripts\spawner.pwn(25) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Thanks, Robert.
Reply


Messages In This Thread
Can someone help? - by 06leachr - 06.01.2011, 17:39
Re: Can someone help? - by DarrenThayer - 06.01.2011, 17:41
Re: Can someone help? - by bartje01 - 06.01.2011, 17:43
Re: Can someone help? - by DarrenThayer - 06.01.2011, 17:51
Re: Can someone help? - by bartje01 - 06.01.2011, 17:55
Re: Can someone help? - by DarrenThayer - 06.01.2011, 17:57
Re: Can someone help? - by iggy1 - 06.01.2011, 17:59
Re: Can someone help? - by 06leachr - 06.01.2011, 18:34

Forum Jump:


Users browsing this thread: 2 Guest(s)