SA-MP Forums Archive
stop train - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: stop train (/showthread.php?tid=263115)



stop train - dud - 20.06.2011

i want to stop train and he stop now

someone know any way to do this

TogglePlayerControllable dont work it can stop car bike but cant stop traint it freeze player but train keep going


i try

Код:
SlowenVehicle(veh,1.3);
Код:
stock SlowenVehicle(vid,Float:howmuch)
{
    static Float:T[3];
	GetVehicleVelocity(vid, T[0], T[1], T[2]);

    return
			SetVehicleVelocity(vid,T[0] / howmuch , T[1] / howmuch , T[2]);
}
this stop car and other vehicle but still canot stop the traint


someone know how to stop traing? and there is some way to do this?


Re: stop train - dud - 20.06.2011

someone know?? how?? and is this posible?


Re: stop train - boelie - 20.06.2011

maybe stupid question but do you mean a train with a player as a driver or an npc as a driver


Re: stop train - dud - 20.06.2011

train whit driver(player)


Re: stop train - Tommy_Mandaz - 20.06.2011

Maybe try to kick the player out of the vehicle and then destroy and respawn the train?


Re: stop train - boelie - 20.06.2011

how about SetVehicleParamsEx the engine part off ?..i tried that with a plane once..i crashed down to earth right away


Re: stop train - Mauzen - 20.06.2011

Check this: https://sampwiki.blast.hk/wiki/SetVehicleVelocity

SetVehicleVelocity does not affect trains, so you cant do it that way. Cant think of a way to stop a train atm to be honest.


Re: stop train - dud - 20.06.2011

as you can see i alredy try whit SetVehicleVelocity
this train its not like all vehicle its something special
if i remove player train have vigor he will keep going and going and slowing down very slowly
cant be stoped whit toggle cant whit velocity whit object so i dont know other way....


Re: stop train - =WoR=Varth - 20.06.2011

Quote:

Maybe try to kick the player out of the vehicle and then destroy and respawn the train?

Have you tried this?


Re: stop train - Donya - 20.06.2011

have you tried setvehiclepos -.-?

New Float, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
SetVehiclePos(vehicleid, x, y, z);