05.05.2016, 12:31
Hello there!
I want to create a "booster". When the player press Y, his speed is boosted.
What is the problem? The problem is when I set the vehicle's velocity.
Take a look : SetVehicleVelocity(GetPlayerVehicleID(playerid), x+0.5, y+0.5, z);
This depending which direction the driver is driving (I hope this means something). :/
So how can I solve the problem?
I want to create a "booster". When the player press Y, his speed is boosted.
What is the problem? The problem is when I set the vehicle's velocity.
Take a look : SetVehicleVelocity(GetPlayerVehicleID(playerid), x+0.5, y+0.5, z);
This depending which direction the driver is driving (I hope this means something). :/
So how can I solve the problem?
PHP код:
if((newkeys & KEY_YES) && (oldkeys & KEY_SPRINT) && IsPlayerInAnyVehicle(playerid))
{
new Float:x, Float:y, Float:z;
SendClientMessage(playerid, -1, "Boosting ...");
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid), x+0.5, y+0.5, z);
return 1;
}