[FilterScript] [FS] Automatic Vehicle Repair
#1

What is this?

An simple automatic vehicle repair filterscript.

Where to download?

CLICK ME

Code .PWN

Код:
#include <a_samp>

#define COLOR_YELLOW 0xFFFF00AA

forward FixAllCar();
new FixTimer;

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Auto Car Repair By : Brian Gutierrez ");
	print("--------------------------------------\n");
	FixTimer = SetTimer("FixAllCar",1000,true);//every 1000 milisecond we call the function "FixAllCar"
	return 1;
}

public OnFilterScriptExit()
{
	KillTimer(FixTimer); // we kill our timer on script unload.
	return 1;
}

public FixAllCar()
{
	for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
	// loop all possible player
	{
		if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
		//if the player is connected AND in a car
		{
			new vehicleid = GetPlayerVehicleID(playerid);// gettin the vehicle id
			SetVehicleHealth(vehicleid,1000.0);// set the vehicle healt
		}
	}
}
Have a happy coding!
Reply
#2

woot first to view and first to post.

nice i'll use thjis in the future

you should make a automatic lotto script<.<
Reply
#3

Quote:
Originally Posted by Kar
woot first to view and first to post.

nice i'll use thjis in the future

you should make a automatic lotto script<.<
Thanks

Take at look at this Lotto FilterScript - http://forum.sa-mp.com/index.php?topic=47457.0
Reply
#4

i mean. i need a lotto with that automatically enters everyone into the lotto then at 20:00 everyday the lotto is drawn and a random player gets the cash
Reply
#5

This is nice but I'd change the time. It fixes the car every second. Isn't that a little excessive? Nice job though!
Reply
#6

Yes, it is good ... but if the vehicle sits for longer wheel back up ... everything explodes. And I changed during repair to 100

And .. Sory For My Bad english..
Reply
#7

You don't need to use a timer - checkout OnVehicleDamageStatusUpdate
Reply
#8

Stop trying to impersonate Westie, you fail
Reply
#9

Quote:
Originally Posted by _Jay_
You don't need to use a timer - checkout OnVehicleDamageStatusUpdate
Quote:
Originally Posted by Matthias_
Stop trying to impersonate Westie, you fail
And please tell me when you're done "destroying" his internet.
Reply
#10

Quote:
Originally Posted by _Jay_
You don't need to use a timer - checkout OnVehicleDamageStatusUpdate
This is only called called when visual elements are damaged, not when the car loses health. It would probably work for a few collisions but after the visual elements (bumpers etc) are completely damaged it will not call OnVehicleDamageStatusUpdate anymore. However, you can use OnVehicleDamageStatusUpdate if you use RepairVehicle instead of SetVehicleHealth.
Reply
#11

nice!
Reply
#12

Simple but nice.
Keep up your good work.
Reply
#13

Quote:
Originally Posted by AivaMan
Simple but nice.
Keep up your good work.
Quote:
Originally Posted by AdonisxD
nice!
Thanks
Reply
#14

This Not you FS is By Tom_Kazami
Reply
#15

I'v been searching this, Thanks !
Reply
#16

Quote:
Originally Posted by Don_Lidner
This Not you FS is By Tom_Kazami
Yeah, the code is really exactly the same :/

Dude, please make your own scripts
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)