Quote:
Originally Posted by spd_sahil
https://sampwiki.blast.hk/wiki/Automatic_Gates Read this <<<<< Helpfull..
if ur bored then..
pawn Код:
OnGameModeInit() { SetTimer("CheckGate1",10,true) } forward CheckGate1(); public CheckGate1() { new mygate_status; for(new i;i<MAX_PLAYERS;i++) { if(!IsPlayerConnected(i)) continue; if(IsPlayerInRangeOfPoint(i,10.0, {YOUR GATES CO-ORDINATES}))mygate_status=1; } if(mygate_status)MoveObject(open2,{ CO_ORDINATEs Change the x OR y depending on where u want the gate to move} ,3.0); else MoveObject(open2,{GATES CO-ORDINATES},3.0); }
|
You called a timer, which will call a callback called "CheckGate", but you named the callback "CheckGate1"