15.09.2011, 16:11
(
Последний раз редактировалось spd_sahil; 15.09.2011 в 19:26.
)
https://sampwiki.blast.hk/wiki/Automatic_Gates Read this <<<<< Helpfull..
if ur bored then..
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);
}