24.12.2012, 08:46
hey guys im working on this command but whenever im not in range of the point it still takes money from me
pawn Code:
COMMAND:repairvehicle(playerid, params[]) // repair vehicle for $175 at mechanic
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You are not in a vehicle! ))");
if(GetPlayerMoney(playerid) < 175) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You don't have the money to perform this action! ))");
if(IsPlayerInRangeOfPoint(playerid, 25.0,2460.5691,-2118.7847,13.5530))
SendClientMessage(playerid, 0x3524C9FF, "(( [Mechanic] Vehicle repaired for $175! ))");
GivePlayerMoney(playerid, -175);
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}