[REQ] Slower Bike Code
#1

Is it possible to make bike slower? because it's so fast ;/
Reply
#2

Use this:

SetVehicleVelocity(vehicleid, Float, Float:y, Float:z);
vehicleid - The ID of the vehicle to set the velocity of.
Float - The amount of velocity in the X direction.
Float:y - The amount of velocity in the Y direction .
Float:z - The amount of velocity in the Z direction.
Reply
#3

Where could i get the default float numbers? because i don't know what is their defaults.
Reply
#4

new Float:X, Float:Y, Float:Z;
GetVehicleVelocity(vehicleid, X, Y, Z);
SetVehicleVelocity(vehicleid, X, Y, Z);//Here you can add defaults like X+5 and Z+2 or something...
Reply
#5

how could add more than 1 vehicleid ?
GetVehicleVelocity(509 || 510 || 481, X, Y, Z); ??
Reply
#6

Quote:
Originally Posted by addinol
how could add more than 1 vehicleid ?
GetVehicleVelocity(509 || 510 || 481, X, Y, Z); ??
Your mistake.. Vehicle ID is NOT Model ID...

I guess you are putting models id..
Reply
#7

so what's VehicleID ? :[
Reply
#8

Quote:
Originally Posted by addinol
so what's VehicleID ? :[
vehicle id is the designed id for a certain car.For example Vehicle ID: 400 stands for Landstalker.
Reply
#9

Quote:
Originally Posted by ShortyDmG
Quote:
Originally Posted by addinol
so what's VehicleID ? :[
vehicle id is the designed id for a certain car.For example Vehicle ID: 400 stands for Landstalker.
NO that is ModelID. VehicleID is the handle ID given when a car is created (GetPlayerVehicleID(playerid)). And also do NOT use + or - in Velocities, because that just means north or south, not forward or backwards

pawn Код:
public OnPlayerUpdate(playerid)
{
if (IsPlayerInAnyVehicle(playerid)) // This goes for EVERY vehicle.
{
new id, Float:vX, Float:vY, Float:vZ;
id = GetPlayerVehicleID(playerid);
GetVehicleVelocity(id, vX, vY, vZ);
SetVehicleVelocity(id, vX * 0.9, vY * 0.9, vZ * 0.9);
}
return 1;
}
Reply
#10

Sorry, i need only for bike. ;[
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)