Repair Car problems
#4

pawn Код:
CMD:fixveh(playerid, params[])
{
    new Float:health;
    new veh = GetPlayerVehicleID(playerid);
    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."); RepairVehicle(veh) GetPlayerMoney(playerid, -500);
        return 0
    }
    IsPlayerInAnyVehicle(playerid);
    {
        if(false) return SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle");
        return 0
    }
    return 1;
Reply


Messages In This Thread
Repair Car problems - by FiveCentz - 23.11.2014, 21:55
Re: Repair Car problems - by Vince - 23.11.2014, 22:19
Re: Repair Car problems - by FiveCentz - 23.11.2014, 22:22
Re: Repair Car problems - by UltraScripter - 23.11.2014, 22:55
Re: Repair Car problems - by FiveCentz - 23.11.2014, 22:56
Re: Repair Car problems - by UltraScripter - 23.11.2014, 23:17
Re: Repair Car problems - by FiveCentz - 23.11.2014, 23:28
Re: Repair Car problems - by UltraScripter - 23.11.2014, 23:29

Forum Jump:


Users browsing this thread: 2 Guest(s)