20.06.2012, 12:00
pawn Code:
#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) && GetVehicleModel(vehicleid) == 502)
//if the player is connected AND in a car
{
RepairVehicle(GetPlayerVehicleID(playerid));// set the vehicle healt
}
}
}
I want to make the auto repair system for car 502 (Hotrina)
Is there any error or something in above script. My Pawno is getting shut down when i compile it