Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- // Auto Repair FS
- // by Klutty
- forward AutoR();
- #define FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" ~Auto Repair~ by Klutty");
- print("--------------------------------------\n");
- SetTimer("AutoR", 1000, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public AutoR() {
- for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
- if(IsPlayerConnected(playerid)) {
- new Float:health, cid;
- if (IsPlayerInAnyVehicle(playerid)) {
- cid = GetPlayerVehicleID(playerid);
- GetVehicleHealth(cid, health);
- if (health < 300) {
- SetVehicleHealth(cid,1000);
- GameTextForPlayer(playerid, "Vehicle repaired!",2000,5);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement