Gates? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gates? (
/showthread.php?tid=377585)
Gates? -
arko123 - 14.09.2012
How would i make a movable gate using this format?
Код HTML:
else if(Player[playerid][Group] == 9)
{
GetPlayerPos(playerid, Positions[0][0], Positions[0][1], Positions[0][2]);
GetDynamicObjectPos(GroveGate, Positions[1][0], Positions[1][1], Positions[1][2]);
if(GroveGateOpen == 0)
{
format(string, sizeof(string), "* %s uses their remote to open the gates.", GetName(playerid));
NearByMessage(playerid, PURPLE, string);
MoveDynamicObject(GroveGateOpen, 2465.50000000, -1672.90002441, 12.30000019, 1);
GroveGateOpen = 1;
}
else
{
format(string, sizeof(string), "* %s uses their remote to close the gates.", GetName(playerid));
NearByMessage(playerid, PURPLE, string);
MoveDynamicObject(GroveGate, 2465.30004883, -1663.59997559, 12.30000019, 1);
GroveGateOpen = 0;
here are the locations:
CLOSED = CreateObject(2933,2540.79980469,-1713.29980469,12.89999962,0.00000000,0.00000000,90 .07690430); //object(pol_comp_gate) (4)
Open = CreateObject(2933,2540.80004883,-1713.30004883,10.39999962,0.00000000,0.00000000,90 .07690430); //object(pol_comp_gate) (4)