Need Help
#2

I hope this is what you're looking for.

pawn Код:
if(strcmp(cmd, "/fix", true) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
    if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000 "You don't have enough cash to repair your vehicle!");
    GivePlayerMoney(playerid, -1000);
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, -1, "Your vehicle has been repaired!");
    return 1;
}

if(strcmp(cmd, "/fuel", true) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
    //Refuel script here.
    SendClientMessage(playerid, -1, "Your vehicle's fuel tank has been refilled!");
    return 1;
}
Reply


Messages In This Thread
......... - by Avi57 - 28.03.2012, 13:22
Re: Need Help - by SpiritEvil - 28.03.2012, 13:29
Re: Need Help - by Avi57 - 28.03.2012, 13:34
Re: Need Help - by SpiritEvil - 28.03.2012, 13:40
Re: Need Help - by Avi57 - 28.03.2012, 13:51
Re: Need Help - by Avi57 - 29.03.2012, 02:22

Forum Jump:


Users browsing this thread: 1 Guest(s)