Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerUpdate( playerid )
- {
- // Callback: OnPlayerUpdate( playerid )
- if( IsPlayerNPC( playerid ) ) AntiSpeedHack[ playerid ] = 999;
- if ( aLogged[ playerid ] )
- {
- Inving[ playerid ] = false;
- if ( Boxing[ playerid ] )
- {
- new
- Float:pHealth;
- GetPlayerHealth( playerid, pHealth );
- if ( pHealth < 15 )
- SetAsBoxingLooser( playerid );
- }
- // HELP SCRIPT START !!!!!!!!
- new vehicleid = GetPlayerVehicleID ( playerid );
- new Float:health;
- GetVehicleHealth(vehicleid, health);
- if(health > 800)
- {
- if ( vehicleid )
- {
- new
- Float: X,
- Float: Y,
- Float: Z,
- Float: speed;
- GetVehicleVelocity ( vehicleid, X, Y, Z );
- speed = floatsqroot ( X * X + Y * Y + Z * Z ) * 100;
- if ( speed > 50.0 )
- {
- SetVehicleVelocity ( vehicleid, X * 0.9, Y * 0.9, Z * 0.9 );
- }}}
- // HELP SCRIPT END!!!!!!!!!!!!!
- if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
- UpdatePlayerInfoText( playerid, PLAYER_STATE_DRIVER,
- GetVehicleSpeed ( GetPlayerVehicleID( playerid ) ) );
- if( gSpikes )
- {
- for(new i = 0; i < MAX_SPIKES; i++)
- {
- if( IsPlayerInRangeOfPoint( playerid, 2.0, gSpikePos[ i ][ 0 ], gSpikePos[ i ][ 1 ], gSpikePos[ i ][ 2 ] ) )
- {
- new panels, doors, lights, tires;
- new carid = GetPlayerVehicleID( playerid );
- GetVehicleDamageStatus( carid, panels, doors, lights, tires );
- tires = encode_tires( 1, 1, 1, 1 );
- UpdateVehicleDamageStatus( carid, panels, doors, lights, tires );
- return 0;
- }
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment