23.11.2014, 22:22
What about it not fixing itself? And I will the try putting it at the top/
E:
The script is like that now, but it still didnt work.
E:
Код:
CMD:fixveh(playerid, params[]) { new Float:health; new veh = GetPlayerVehicleID(playerid); IsPlayerInAnyVehicle(playerid); { if(false) return SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle"); } GetVehicleHealth(veh, health); { if(health > 900) return SendClientMessage(playerid, COLOR_RED, "Vehicle doesn't need repairing!"); else if(health < 500) return SendClientMessage(playerid, COLOR_RED, "Vehicle is too damaged! Get a mechanic!"); if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money! You need $500!"); else if(GetPlayerMoney(playerid) > 500) return SendClientMessage(playerid, COLOR_GREEN, "The vehicle is now repaired."); SetVehicleHealth(veh, 1000.0); GetPlayerMoney(playerid, -500); } return 1; }