/repair command
#3

pawn Код:
dcmd_repair(playerid, params[])
{
    #pragma unused params
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW,"You must be inside vehicle to use this command!");
    if(IsPlayerInRangeOfPoint(playerid, Put your coords here)) // 'Ok so the player is in range, now what?'
    {
        if(GetPlayerMoney(playerid > 100) // 'Ok so if they have over $100, I will allow them to repair their vehicle'
        {
            RepairVehicle(GetPlayerVehicleID(playerid)); // 'repair'
            SendClientMessage(playerid,0xFFFF00AA,"Server: Your Vehicle Has Been Repaired!"); // ' I will let them know '
        }
        else return SendClientMessage(playerid,-1, "You do not have $100 to repair your vehicle!"); // ' They don't have $100 so I have to tell them they do not have it. '
    }
    return 1;
}
This explains it a bit more.
Reply


Messages In This Thread
/repair command - by sscarface - 25.04.2012, 21:19
Re: /repair command - by Kindred - 25.04.2012, 21:36
Re: /repair command - by Elysian` - 25.04.2012, 21:39
Re: /repair command - by [MG]Dimi - 25.04.2012, 21:40
Re: /repair command - by sscarface - 25.04.2012, 22:08
Re: /repair command - by Yuryfury - 25.04.2012, 23:19
Re: /repair command - by sscarface - 25.04.2012, 23:24
Re: /repair command - by Yuryfury - 25.04.2012, 23:34
Re: /repair command - by sscarface - 25.04.2012, 23:42
Re: /repair command - by Yuryfury - 25.04.2012, 23:50

Forum Jump:


Users browsing this thread: 3 Guest(s)