Change maximum speed of a car - 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: Change maximum speed of a car (
/showthread.php?tid=664622)
Change maximum speed of a car -
Calinut200 - 05.03.2019
I want to make a system that will allow you to upgrade your car through the command / upgrade.
Okay, now I do not know how to change the power of cars to go faster. I found a filescript, where all cars have increased speed, Ex:
Infernus normal = 220km,
with fs
Infernus = 300km
I want to upgrade through /upgrade, not all cars have this upgrade already.
I make something like that , but works like a boost for 2-3 seconds and then is go back to normal speed.
PHP код:
CMD:upgrade(playerid)
{
new Float:Velocity[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0] * 1.8 , Velocity[1] * 1.8, Velocity[2] * 1.8);
return 1;
}
Re: Change maximum speed of a car -
v1k1nG - 05.03.2019
Hello,
https://sampwiki.blast.hk/wiki/Velocity_Tutorial
Re: Change maximum speed of a car -
Calinut200 - 05.03.2019
I don't understand..
Re: Change maximum speed of a car -
MafiaOink - 06.03.2019
Don't try this, I've tried this aswell. I have used Onplayerupdate and set velocity under it, it became laggy and very dependent on player's ping. It will work fine only if you are having like 1-10~ ping.
If you want to change the maximum speed then use the plugin by .silent which allows you to change handling using a better method.
Here's a link:
https://sampforum.blast.hk/showthread.php?tid=663066
Re: Change maximum speed of a car -
v1k1nG - 06.03.2019
"I don't advice to introduce this to your players yet."