09.04.2011, 15:48
Okay, well I need barriers for the SFPD.. I have the cords and everything but I cant seem to get it..
What it does is if I type /gate near the object, it will open (stand up) and close after a little bit..
Timer
What it does is if I type /gate near the object, it will open (stand up) and close after a little bit..
pawn Код:
if(GateOpen2 == 0) {
format(string, sizeof(string), "* %s uses their remote to open the gates.", GetName(playerid));
NearByMessage(playerid, NICESKY, string);
MoveDynamicObject(sfpdbarrier, -1572.20983887,658.81811523,6.77031469, 1);
GateOpen2 = 1;
SetTimer("CloseSFPDGate2", 5000, false);
}
else {
SendClientMessage(playerid, WHITE, "The gate is already open, wait for it to close.");
}
}
}
pawn Код:
public CloseSFPDGate2()
{
MoveDynamicObject(sfdbarrier, -1572.21887207,658.75366211,6.77031469, 1);
GateOpen2 = 0;
return 1;
}