SA-MP Forums Archive
ferry help - 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: ferry help (/showthread.php?tid=367439)



ferry help - rami.chaar2 - 10.08.2012

hey guys i am making a ferry for a server i play on i i got a way to get it to the place now i need it to make it come back
for(new i; i < MAX_PLAYERS; i++) // Start the loop
{
if(IsPlayerInRangeOfPoint(i, 15.0, 2637.80004883,-2268.39990234,1.00000000)) //Check if any player is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
{
if(gateopen == false) // If the gate isn't open...
{
MoveObject(gate, 3717.89990234,-2277.19995117,1.00000000, 3.5); //Then open it! Change '32.0, 12.0, 10.0' to the coordinates of your opened gate.
gateopen = true; // Setting this to true indicates it's open(ing)
}
return; //This closes the callback
}
}
//This is called if nobody has been found near the gate. Obviously, because 'return' would fully close the function and this wouldn't be used then.
if(gateopen == true) //If the gate IS open, but there's no one near..
{
MoveObject(gate, 3717.89990234,-2277.19995117,1.00000000, 3.5); // Change the '8.0, 3.0, 10.0' to the coordinates of your gate when it's closed.
gateopen = false; //This indicates the gate is closed again. Or at least, closing.
}
}
that is how i got it to go were i want it to go now i need to make a recall so it comes back


Re: ferry help - Glint - 10.08.2012

Well first of all tag your code wih [pawn] tags.


Re: ferry help - rami.chaar2 - 10.08.2012

ok i did i had someone pm me that helped me thx