Super fast vehicle. - 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: Super fast vehicle. (
/showthread.php?tid=478674)
Super fast vehicle. -
JonesyFoCoTDM - 30.11.2013
Hi guys, I'll try and explain this as clear as I can.
Basically I've seen before on a server that when inside a car, if you kept pressing left shift key you would go super fast when inside a vehicle. It's not nos, it's more like speed hacks, accept it was scripted into the server.
I'm basically asking how is this done? I'm wanting to add it to my script.
Any help is appreciated, thank you.
Re: Super fast vehicle. -
Konstantinos - 30.11.2013
https://sampwiki.blast.hk/wiki/SetVehicleVelocity
An example of using speedboost while pressing the left mouse button:
pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
if( ( newkeys & KEY_FIRE ) && !( oldkeys & KEY_FIRE ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
new
Float: vx,
Float: vy,
Float: vz
;
GetVehicleVelocity( GetPlayerVehicleID( playerid ), vx, vy, vz );
SetVehicleVelocity( GetPlayerVehicleID( playerid ), vx * 1.2, vy * 1.2, vz * 1.2 );
}
}
return 1;
}
Re: Super fast vehicle. -
Kenrque - 30.11.2013
It's not up to me, it is up to you can go fast and uses animation so that if I figured out
Re: Super fast vehicle. -
JonesyFoCoTDM - 30.11.2013
Thank you very much.