Guest User

Untitled

a guest
Dec 7th, 2010
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.67 KB | None | 0 0
  1. public OnPlayerUpdate( playerid )
  2. {
  3.  
  4.     // Callback: OnPlayerUpdate( playerid )
  5.  
  6.     if( IsPlayerNPC( playerid ) ) AntiSpeedHack[ playerid ] = 999;
  7.  
  8.     if ( aLogged[ playerid ] )
  9.     {
  10.         Inving[ playerid ] = false;
  11.  
  12.         if ( Boxing[ playerid ] )
  13.         {
  14.             new
  15.                 Float:pHealth;
  16.  
  17.             GetPlayerHealth( playerid, pHealth );
  18.  
  19.             if ( pHealth < 15 )
  20.                 SetAsBoxingLooser( playerid );
  21.         }
  22. // HELP SCRIPT START   !!!!!!!!            
  23.  
  24. new vehicleid = GetPlayerVehicleID ( playerid );
  25.     new Float:health;
  26.    GetVehicleHealth(vehicleid, health);
  27.     if(health > 800)
  28.         {
  29. if ( vehicleid )
  30.  {
  31.     new
  32.       Float: X,
  33.       Float: Y,
  34.       Float: Z,
  35.       Float: speed;
  36.  
  37.   GetVehicleVelocity ( vehicleid, X, Y, Z );
  38.   speed = floatsqroot ( X * X + Y * Y + Z * Z ) * 100;
  39.  
  40.   if ( speed > 50.0 )
  41.   {
  42.       SetVehicleVelocity ( vehicleid, X * 0.9, Y * 0.9, Z * 0.9 );
  43.   }}}
  44. // HELP SCRIPT END!!!!!!!!!!!!!  
  45.         if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
  46.             UpdatePlayerInfoText( playerid, PLAYER_STATE_DRIVER,
  47.                         GetVehicleSpeed ( GetPlayerVehicleID( playerid ) ) );
  48.  
  49.         if( gSpikes )
  50.         {
  51.             for(new i = 0; i < MAX_SPIKES; i++)
  52.             {
  53.                 if( IsPlayerInRangeOfPoint( playerid, 2.0, gSpikePos[ i ][ 0 ], gSpikePos[ i ][ 1 ], gSpikePos[ i ][ 2 ] ) )
  54.                 {
  55.                     new panels, doors, lights, tires;
  56.                     new carid = GetPlayerVehicleID( playerid );
  57.                     GetVehicleDamageStatus( carid, panels, doors, lights, tires );
  58.                     tires = encode_tires( 1, 1, 1, 1 );
  59.                     UpdateVehicleDamageStatus( carid, panels, doors, lights, tires );
  60.                     return 0;
  61.                 }
  62.             }
  63.         }
  64.  
  65.     }
  66.  
  67.     return true;
  68. }
Advertisement
Add Comment
Please, Sign In to add comment