#include <a_samp> #define blue 0x0000FFFF forward GateCheck(); new AutomaticGate; public OnGameModeInit() { SetTimer("GateCheck", 500, true); AutomaticGate = CreateObject(969,2237.421,2449.144,9.838,0.0,0.0,9 0.000); AutomaticGate = CreateObject(971,2293.847,2498.374,5.768,0.0,0.0,-90.000); AutomaticGate = CreateObject(971,2335.227,2443.460,8.261,0.0,0.0,5 9.68; return 1; } public GateCheck() for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(IsPlayerInRangeOfPoint(i, 10.0, 2237.421, 2449.144, 9.83) MoveObject(AutomaticGate, 2237.414, 2457.107, 9.840, 5); else MoveObject(AutomaticGate, 2237.421, 2449.144, 9.838, 5); if(IsPlayerInRangeOfPoint(i, 10.0, 2293.847, 2498.374, 5.76) MoveObject(AutomaticGate, 2293.847, 2498.374, 10.518, 5); else MoveObject(AutomaticGate, 2293.847, 2498.374, 5.768, 5); if(IsPlayerInRangeOfPoint(i, 10.0, 2335.227, 2443.460, 8.261)) MoveObject(AutomaticGate, 2335.170, 2443.313, 1.311, 5)); else MoveObject(AutomaticGate, 2335.227, 2443.460, 8.261, 5); |
C:\Users\Jing\Desktop\Automatic Gate.pwn(27) : error 010: invalid function or declaration C:\Users\Jing\Desktop\Automatic Gate.pwn(29) : error 010: invalid function or declaration C:\Users\Jing\Desktop\Automatic Gate.pwn(32) : error 010: invalid function or declaration C:\Users\Jing\Desktop\Automatic Gate.pwn(34) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
AutomaticGate = CreateObject(969,2237.421,2449.144,9.838,0.0,0.0,9 0.000);
AutomaticGate = CreateObject(971,2293.847,2498.374,5.768,0.0,0.0,-90.000);
AutomaticGate = CreateObject(971,2335.227,2443.460,8.261,0.0,0.0,5 9.68;
AutomaticGate1 = CreateObject(969,2237.421,2449.144,9.838,0.0,0.0,9 0.000);
AutomaticGate2 = CreateObject(971,2293.847,2498.374,5.768,0.0,0.0,-90.000);
AutomaticGate3 = CreateObject(971,2335.227,2443.460,8.261,0.0,0.0,5 9.68;
new AutomaticGate1,AutomaticGate2,AutomaticGate3;
if(IsPlayerInRangeOfPoint(playerid,10.0,2237.421,2449.144,9.838)) // cordinates of AutomaticGate1
{
MoveObject(AutomaticGame1,X,Y,Z, Speed); // put cordinates to open it
return 1;
}