01.04.2011, 21:32
it looks like this now:
onplayercommand
pawn Code:
//at the top
new autorepair[MAX_PLAYERS];
pawn Code:
forward AutoR(playerid);
public AutoR(playerid)
{
new Float:VHealth, vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid,VHealth);
if(autorepair[playerid] == 1)
{
if (IsPlayerInAnyVehicle(playerid))
{
if(VHealth < 999)
{
RepairVehicle(vehicleid);
}
}
}
return 1;
}
pawn Code:
if (strcmp("/offroadmap", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, -2644, -2130, 1704+1);
SendClientMessage(playerid, COLOR_ORANGE, "Thank Thanator for making the offroad road");
autorepair[playerid] = 1;
SetPlayerCheckpoint(playerid, 79.8441, -1531.5741, 2413.0000, 5);
return 1;
}