07.11.2012, 06:31
Код:
#define FILTERSCRIPT #include <a_samp> #include <zcmd> #if defined FILTERSCRIPT #endif new Gate, bool:Open; //Single gate public OnFilterScriptInit() { Gate = CreateObject(989,F1428.6284, 241.9930, 20.3020,359.2969, 0.7000, 172.9962,Float:DrawDistance = 0.0); return 1; } CMD:gate(playerid,params[]) { if(IsPlayerInRangeOfPoint(playerid,10,1428.6456, 242.0033, 20.3020)//Gate 1 { switch(Open{0})//Check whether the gate opened or closed { case true://If the gate opened { MoveObject(Gate[0],1428.6456, 242.0033, 20.3020,4);//Close the gate Open{0} == false;//false for closed } case false://If the gate closed { MoveObject(Gate[0],1426.5259, 237.4716, 20.3020,4);//Open the gate Open{0} == true;//true for opened } } return 1; } SendClientMessage(playerid,color,"You're not close enough to the gate.");//Send error message if player isn't near any gate return 1; }
Код:
C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : error 017: undefined symbol "F1428" C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : error 029: invalid expression, assumed zero C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : warning 215: expression has no effect C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : warning 215: expression has no effect C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : warning 215: expression has no effect C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : warning 215: expression has no effect C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : warning 215: expression has no effect C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : warning 215: expression has no effect C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : error 017: undefined symbol "DrawDistance" C:\Users\Josh\Desktop\FCSLRP\filterscripts\Moving Gates.pwn(16) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.