PHP Code:
CMD:repairmycar(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
return SendErrorMessage(playerid, "You are not in a vehicle!");
if(GetPlayerState(playerid) != 2)
return SendErrorMessage(playerid, "You are not in the driver seat!");
if(!IsPlayerInRangeOfPoint(playerid, 15.0, -2417.7744, 2303.7979, 1.8781))
return SendErrorMessage(playerid, "You should be in range of the point to /repairmycar !");
SendClientMessage(playerid, COLOR_WHITE, "Your vehicle will be ready in a half of hour (30 seconds).");
RemovePlayerFromVehicle(playerid);
SetTimerEx("RepairMyCar",30000,false,"d",GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid, - 150);
return 1;
}
forward RepairMyCar(pvehicleid);
public RepairMyCar(pvehicleid)
{
RepairVehicle(pvehicleid);
return 1;
}
PHP Code:
if(!IsPlayerInRangeOfPoint(playerid, 15.0, -2417.7744, 2303.7979, 1.8781))