26.12.2011, 15:19
on top of gamemode put
new gate;
forward close();
public close()
{
MoveObject(gate,1410.69995117,-1653.50000000,12.39999962,2); //coordinates of closed gate
return 1;
}
for example this is your gate object
gate = CreateDynamicObject(1575,2140.80004883,-1804.30004883,16.60000038,0.97778320,0.00000000,0. 00000000); //object(drug_white) (37) --that goes under ongamemodeinit
onplayerupdate
if(IsPlayerInRangeOfPoint(playerid,8,1410.69995117 ,-1653.50000000,12.39999962))
{
MoveObject(gate,1410.69995117,-1653.59997559,9.09999943,2); // coordinates where to move gate
SetTimer("close",5000,0);
return 1;
}
new gate;
forward close();
public close()
{
MoveObject(gate,1410.69995117,-1653.50000000,12.39999962,2); //coordinates of closed gate
return 1;
}
for example this is your gate object
gate = CreateDynamicObject(1575,2140.80004883,-1804.30004883,16.60000038,0.97778320,0.00000000,0. 00000000); //object(drug_white) (37) --that goes under ongamemodeinit
onplayerupdate
if(IsPlayerInRangeOfPoint(playerid,8,1410.69995117 ,-1653.50000000,12.39999962))
{
MoveObject(gate,1410.69995117,-1653.59997559,9.09999943,2); // coordinates where to move gate
SetTimer("close",5000,0);
return 1;
}