28.09.2012, 22:27
pawn Код:
CMD:autofix(playerid)
{
if(GetPVarInt(playerid,"Autofix"))
{
DeletePVar(playerid,"Autofix");
SendClientMessage(playerid,-1,"Autofix disabled!");
}
else
{
SetPVarInt(playerid,"Autofix",true);
SendClientMessage(playerid,-1,"Autofix enabled!");
}
return 1;
}
pawn Код:
if(GetVehicleHealth(vehicleid) < 1000) if(GetPVarInt(playerid,"Autofix")) RepairVehicle(vehicleid);