/repair command
#4

For some reasons I would also add check for vehicle...

pawn Код:
dcmd_repair(playerid, params[])
{
    //if(!IsPlayerInRangeOfPoint(playerid,Float:Range,Float:X,Float:Y,Float:Z)) return SendClientMessage(playerid, COLOR_YELLOW,"You must at gas station to use this command!");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW,"You must be inside vehicle to use this command!");
    if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_YELLOW,"You do not have enough money to repair your vehicle!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid,0xFFFF00AA,"Server: Your Vehicle Has Been Repaired!");
    GivePlayerMoney(playerid, -100);
    return 1;
}
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: 1 Guest(s)