stock IncreaseSpeed(vehicleid,Float:speed) // Aquн da error
{ //By OTACON
new Float:Velocity[4];
SetVehicleVelocity(vehicleid,0,0,0); // Y aquн tambiйn
GetVehicleVelocity(vehicleid,Velocity[0],Velocity[1],Velocity[2]);
GetVehicleZAngle(vehicleid,Velocity[3]);
Velocity[0] = Velocity[0] + (speed/speed * floatsin(-Velocity[3], degrees));
Velocity[1] = Velocity[1] + (speed/speed * floatcos(-Velocity[3], degrees));
SetVehicleVelocity(vehicleid,Velocity[0],Velocity[1],Velocity[2]);}
}
if(PlayerInfo[playerid][pVCepo] != 1)
{
IncreaseSpeed(GetPlayerVehicleID(playerid),-5.0);
}
stock IncreaseSpeed(vehicleid,Float:speed) // Aquн da error
{ //By OTACON
new Float:Velocity[4];
SetVehicleVelocity(vehicleid,0,0,0); // Y aquн tambiйn
GetVehicleVelocity(vehicleid,Velocity[0],Velocity[1],Velocity[2]);
GetVehicleZAngle(vehicleid,Velocity[3]);
Velocity[0] = Velocity[0] + (speed/speed * floatsin(-Velocity[3], degrees));
Velocity[1] = Velocity[1] + (speed/speed * floatcos(-Velocity[3], degrees));
SetVehicleVelocity(vehicleid,Velocity[0],Velocity[1],Velocity[2]);}
} //<---- esta de mas
IncreaseSpeed(GetPlayerVehicleID(playerid),-5.0); //esta mal, el valor debe ser positivo si no ira para atras :D.
.|
Код:
stock IncreaseSpeed(vehicleid,Float:speed) // Aquн da error
{ //By OTACON
new Float:Velocity[4];
SetVehicleVelocity(vehicleid,0,0,0); // Y aquн tambiйn
GetVehicleVelocity(vehicleid,Velocity[0],Velocity[1],Velocity[2]);
GetVehicleZAngle(vehicleid,Velocity[3]);
Velocity[0] = Velocity[0] + (speed/speed * floatsin(-Velocity[3], degrees));
Velocity[1] = Velocity[1] + (speed/speed * floatcos(-Velocity[3], degrees));
SetVehicleVelocity(vehicleid,Velocity[0],Velocity[1],Velocity[2]);}
} //<---- esta de mas
Код:
IncreaseSpeed(GetPlayerVehicleID(playerid),-5.0); //esta mal, el valor debe ser positivo si no ira para atras :D. .pero esta funcion es nada mas para levantar la velocidad, si tu kieres establecer una nueva velocidad a los vehiculos utiliza lo que te pasaron arriba. saludos. |