06.01.2011, 17:39
Hello guys. I have a filterscript which spawns cars. I wish to make the command admin only. The script is as follows:
In my gamemode we define admins as the follows:
Can someone tell me where to stick it in the script without getting errors like the below?
Thanks, Robert.
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;
}
pawn Код:
if( Player[playerid][AdminLevel] >= 1 && Player[playerid][AdminDuty] > 0 )
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.