[Include] Run-Flat Tire System
#1

Run-Flat Tire System
Created by StrickenKid (Ethan1233 - <__Ethan__>)
About:
This system uses the new VehicleDamageStatus functions to check if a tire is popped, and will fix the tire if it is popped. This system can be used in about any server type and can be very useful.
Once a tire is popped and the player has a runflat for that tire, the tire will be fixed and the player won't have a runflat for that tire anymore. Use GivePlayerRunflats to give a player runflats on all four tires.

Functions:
  • ProcessRunflatTires( playerid, &tires )
  • GivePlayerRunflats( playerid )
Install:
  1. Place the include file in your server includes directory.
  2. Add the include preprocessor to your gamemode:
    Код:
    #include "../include/runflat_tires.inc"
  3. Add the following code to your OnVehicleDamageStatusUpdate callback:
    Код:
    public OnVehicleDamageStatusUpdate( vehicleid, playerid )
    {
        new
    		panels,
    		doors,
    		lights,
    		tires;
    
        GetVehicleDamageStatus( vehicleid, panels, doors, lights, tires );
    
        ProcessRunflatTires( playerid, tires );
    
        UpdateVehicleDamageStatus( vehicleid, panels, doors, lights, tires );
    
        return 1;
    }
  4. Give the players run-flats on connect or with a command etc:
    Код:
    GivePlayerRunflats( playerid );
Download:
Run-Flat Tire System 1.0
Reply
#2

very nice
Reply
#3

Very nice!
Reply
#4

i like this cant believe these new functions really happy with samp now
Reply
#5

Yes, the new functions are very useful
Reply
#6

the link is not available, you could put it again?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)