[FS] Automatic Vehicle Repair -
Brian_G - 20.06.2010
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!
Re: [FS] Automatic Vehicle Repair -
Kar - 20.06.2010
woot first to view and first to post.
nice
i'll use thjis in the future
you should make a automatic lotto script<.<
Re: [FS] Automatic Vehicle Repair -
Brian_G - 20.06.2010
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
Re: [FS] Automatic Vehicle Repair -
Kar - 20.06.2010
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
Re: [FS] Automatic Vehicle Repair -
randomkid88 - 20.06.2010
This is nice but I'd change the time. It fixes the car every second. Isn't that a little excessive? Nice job though!
Re: [FS] Automatic Vehicle Repair -
coconyr - 20.06.2010
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..
Re: [FS] Automatic Vehicle Repair -
Jay_ - 20.06.2010
You don't need to use a timer - checkout OnVehicleDamageStatusUpdate
Re: [FS] Automatic Vehicle Repair -
GTA_Rules - 20.06.2010
Stop trying to impersonate Westie, you fail
Re: [FS] Automatic Vehicle Repair - [03]Garsino - 20.06.2010
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.
Re: [FS] Automatic Vehicle Repair -
Tr1viUm - 20.06.2010
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.
Re: [FS] Automatic Vehicle Repair -
Adoniiz - 20.06.2010
nice!
Re: [FS] Automatic Vehicle Repair -
AiVAMAN - 20.06.2010
Simple but nice.
Keep up your good work.
Re: [FS] Automatic Vehicle Repair -
Brian_G - 20.06.2010
Quote:
Originally Posted by AivaMan
Simple but nice.
Keep up your good work.
|
Quote:
Originally Posted by AdonisxD
nice!
|
Thanks
Re: [FS] Automatic Vehicle Repair -
Don_Lidner - 23.06.2010
This Not you FS is By Tom_Kazami
Re: [FS] Automatic Vehicle Repair -
Plugy - 23.06.2010
I'v been searching this, Thanks !
Re: [FS] Automatic Vehicle Repair -
ViruZZzZ_ChiLLL - 23.06.2010
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