Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward SpeedUp();
- public SpeedUp() {
- if(togstage == 0) {
- new
- vehicleid,
- keys,
- Float:vx,
- Float:vy,
- Float:vz
- ;
- foreach(new i : Player) {
- if (!IsPlayerConnected(i))
- continue;
- if ((vehicleid = GetPlayerVehicleID(i))) {
- new db = PersonalCar(i);
- if(db == -1) continue;
- if(db > 0) {
- if(CarInfo[db][cStage] == 0) continue;
- }
- GetPlayerKeys(i, keys, _:vx, _:vx);
- if (keys == KEY_VEHICLE_FORWARD) {
- GetVehicleVelocity(vehicleid, vx, vy, vz);
- if (vx * vx + vy * vy < g_SpeedThreshold)
- continue;
- if(Carspeed(i) < 150) continue;
- if (Carspeed(i) > (CarInfo[db][cSpeed]-2) )
- continue;
- vx *= SPEED_MULTIPLIER;
- vy *= SPEED_MULTIPLIER;
- if (vz > 0.03 || vz < -0.03)
- vz -= 0.010;
- SetVehicleVelocity(vehicleid, vx, vy, vz);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement