Need help with /repair command.
#2

Command needs to be in the gamemode, or else you'll get undefined symbol errors.
pawn Код:
CMD:repair(playerid, params[])
{
    if(PlayerInfo[playerid][pJob] == 1) // Learn how to use if statements
    {
        new vehicleid;
        vehicleid = GetClosestVehicle(playerid);
        if(PlayerToVehicle(playerid, vehicleid, 3.0))
        {
            SetVehicleHealth(vehicleid, 1000.0);
            SendClientMessage(playerid, COLOR_WHITE, "You have fully repaired the engine.");
            SendClientMessage(playerid, COLOR_WHITE, "{CC3333}NOTICE:{ffffff} You haven't received any payment for your work. Ask the other player to pay you.");
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_WHITE, "You are not near a vehicle!");
     
    }
    else return SendClientMessage(playerid, COLOR_WHITE, "You are not a mechanic!");
}
Reply


Messages In This Thread
Need help with /repair command. - by Gytis0 - 13.04.2012, 23:21
Re: Need help with /repair command. - by ReneG - 13.04.2012, 23:28
Re: Need help with /repair command. - by Gytis0 - 13.04.2012, 23:39
Re: Need help with /repair command. - by ReneG - 13.04.2012, 23:43
Re: Need help with /repair command. - by Gytis0 - 13.04.2012, 23:55

Forum Jump:


Users browsing this thread: 1 Guest(s)