Spam !
#4

pawn Код:
CMD:refuel(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine == VEHICLE_PARAMS_ON) return SendClientMessageEx(playerid, COLOR_RED, "You need to shut off the engine before filling up (/car engine).");
        if(!IsAtFuelStation(playerid)) return SendClientMessageEx(playerid, COLOR_RED, "You're not at a fuel station.");
        if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_RED,"This vehicle doesn't need fuel.");
        if(VehicleFuel[vehicleid] >= 100.0) return SendClientMessageEx(playerid, COLOR_RED, "This vehicle's tank is already full.");
        if(RefuelingVehicle[playerid] == 1) return SendClientMessageEx(playerid, COLOR_RED, "You are refilling your vehicle's tank.");
        SendClientMessageEx(playerid, COLOR_WHITE, "Refueling your vehicle's tank, please wait.");
        RefuelingVehicle[playerid] = 1;
        RefuelingVehicleTimer[playerid] = SetTimerEx("ReFill", 1000, false, "i", playerid);
    }
    return 1;
}
Reply


Messages In This Thread
Spam ! - by Red_Dragon. - 09.10.2012, 13:12
Re: Spam ! - by ReneG - 09.10.2012, 13:19
Re: Spam ! - by Red_Dragon. - 09.10.2012, 13:29
Re: Spam ! - by ToiletDuck - 09.10.2012, 13:47
Re: Spam ! - by Red_Dragon. - 09.10.2012, 14:05
Re: Spam ! - by ToiletDuck - 09.10.2012, 14:08
Re: Spam ! - by Red_Dragon. - 09.10.2012, 14:16

Forum Jump:


Users browsing this thread: 1 Guest(s)