22.08.2011, 15:30
Since MidoTrick's script code is messed up by 3 things, I made a re-make of his script.
Credit's goes to him.
Credit's goes to him.
pawn Code:
///Somewhere on top of your script
new bool:HasVehicleGodmode[MAX_PLAYERS];
//Under OnGameModeInit
SetTimer("Actualize", 2000, true);
//Under your Command Godmode (ON)
HasVehicleGodmode[playerid] = true;
//Under your Command Godmode (OFF)
HasVehicleGodmode[playerid] = false;
//Somewhere between all the Callbacks (public's)
forward AutoR(playerid);
public AutoR(playerid)
{
if(IsPlayerInAnyVehicle(playerid) && HasVehicleGodmode[playerid])
{
new vid = GetPlayerVehicleID(playerid);
RepairVehicle(vid);
}
return 1;
}