Change maximum speed of a car
#1

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.8Velocity[2] * 1.8);
    return 
1;

Reply
#2

Hello, https://sampwiki.blast.hk/wiki/Velocity_Tutorial
Reply
#3

I don't understand..
Reply
#4

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
Reply
#5

"I don't advice to introduce this to your players yet."
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)