Advertisement
Shiny_

GUNWO NA ZDOLE :<<<<<<>>>>_:

Aug 23rd, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.29 KB | None | 0 0
  1. public OnPlayerUpdate(playerid) {
  2.     new cs, Float:x, Float:y, Float:z;
  3.    
  4.     if(IsPlayerInAnyVehicle(playerid))GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); else GetPlayerPos(playerid, x, y, z);
  5.     ppos[playerid][0] = x;
  6.     ppos[playerid][1] = y;
  7.     ppos[playerid][2] = z;
  8.     cs=GetPlayerState(playerid);
  9.  
  10.     if(AutoFixBool[playerid] && IsPlayerInAnyVehicle(playerid)) {
  11.         SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
  12.     }
  13.     if(DriftMode[playerid] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[playerid]>70) {
  14.         new Float:h;
  15.         GetVehicleHealth(GetPlayerVehicleID(playerid),h);
  16.         if(h<HealthInit[playerid]) {
  17.             KillTimer(DriftTimer[playerid]);
  18.             DriftExit(playerid);
  19.             GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~r~Boom",800,5);
  20.             DriftMode[playerid]=false;
  21.         }
  22.     }
  23.     if(cs==PLAYER_STATE_DRIVER && DriftMode[playerid]==false) {
  24.         if(GetVType(GetPlayerVehicleID(playerid))) {
  25.             DriftMode[playerid]=true;
  26.             GetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
  27.             AutoFixBool[playerid]=false;
  28.             DriftTimer[playerid]=SetTimerEx("Drift", 200, true, "i", playerid);
  29.         }
  30.     }
  31.     else if(cs!=PLAYER_STATE_DRIVER && DriftMode[playerid]==true) {
  32.         KillTimer(DriftTimer[playerid]);
  33.         DriftMode[playerid]=false;
  34.         AutoFixBool[playerid]=true;
  35.     }
  36.     return 1;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement