toribio

toribio

Jul 27th, 2010
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.76 KB | None | 0 0
  1. public OnPlayerUpdate(playerid)
  2. {
  3.     if(!IsPlayerNPC(playerid))
  4.     {
  5.         new
  6.             keys, udlr;
  7.  
  8.         GetPlayerKeys(playerid, keys, udlr, udlr);
  9.         if((GetPlayerState(playerid) == PLAYER_STATE_DRIVER) && ((keys & 4) || (keys & 1)))
  10.         {
  11.             new
  12.                 Float:x, Float:y, Float:z,
  13.                 vehicleid = GetPlayerVehicleID(playerid);
  14.  
  15.             GetVehicleVelocity(vehicleid, x, y, z);
  16.             if(keys & 4)
  17.             {
  18.                 SetVehicleVelocity(vehicleid, x + (x / 4), y + (y / 4), z + (z / 4));
  19.             }
  20.             else if(keys & 1)
  21.             {
  22.                 SetVehicleVelocity(vehicleid, x - (x / 18.0), y - (y / 18.0), z - (z / 18.0));
  23.             }
  24.         }
  25.     }
  26.     return 1;
  27. }
Add Comment
Please, Sign In to add comment