18.01.2014, 14:41
Hi all
i have a problem with my script
i made a gate script only for admins
i get these errors
I am using this script:
the code has to be in a Filterscript
i have a problem with my script
i made a gate script only for admins
i get these errors
Код:
D:\games\gta trucking server\filterscripts\gate1.pwn(20) : error 017: undefined symbol "APlayerData" D:\games\gta trucking server\filterscripts\gate1.pwn(20) : warning 215: expression has no effect D:\games\gta trucking server\filterscripts\gate1.pwn(20) : error 001: expected token: ";", but found "]" D:\games\gta trucking server\filterscripts\gate1.pwn(20) : error 029: invalid expression, assumed zero D:\games\gta trucking server\filterscripts\gate1.pwn(20) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
#define FILTERSCRIPT #include <a_samp> new adminarea; public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Gate1 loaded "); print("--------------------------------------\n"); //*ADMIN GATE*// adminarea = CreateObject(19278,268.7369, 1884.0020, -33.0162,0.00000000,0.00000000,000.00000000); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (APlayerData[playerid][PlayerLevel] >= 1) if(!strcmp(cmdtext, "/close", true, 14)) { MoveObject(adminarea, 268.7369, 1884.0020, -33.0162, 3.0); SendClientMessage(playerid, 0xEF994300, "The gate has been closed."); return 1; } if (APlayerData[playerid][PlayerLevel] >= 1) if(!strcmp(cmdtext, "/open", true, 16)) { MoveObject(adminarea, 268.7369, 1884.0020, -80.9320, 3.0); SendClientMessage(playerid, 0xEF994300, "The gate has been opened."); return 1; } return 0; }