Small 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: Small help (
/showthread.php?tid=619951)
Small help -
bugmenotlol - 24.10.2016
i have a command to exit from rc
PHP код:
cmd;exitrc
{
new float x,y,z;
GetPlayerPos(x,y,z);
SetPlayerPos(x,y,z);
}
return 1;
when i am using this command i am spawning behind rc i need to make it in spawn in up of rc. so how can i make it ?
Re: Small help -
lackmail - 24.10.2016
replace this:
Код:
GetPlayerPos(x,y,z);
SetPlayerPos(x,y,z);
with this:
Код:
GetVehiclePos(GetPlayerVehicleID(plauerid), x, y, z);
SetPlayerPos(playerid, x, y, z+2);
Re: Small help -
bugmenotlol - 24.10.2016
i know it dude
i just have an intention to show code but i need a system to spawn player up on rc car
Re: Small help -
Denying - 24.10.2016
It's really a matter of speed and ping.
If one player is driving really slowly, you could use the given coordinates and add maybe a bit to the direction they're driving, but if one drives fast, using a Cheetah or any other fast car, at full speed, your best shot (without complex calculation) is to toggle the driving player uncontrollable, TP the player and set the driver to be controllable.
Other than that, start calculating.
Or I may be wrong, who knows.
Re: Small help -
Kaliber - 24.10.2016
You can SetVehicleVelocity to zero
That stops the Car and then teleport it to it