28.03.2014, 06:54
Код:
CMD:refuel(playerid, params[])//Fuel System CMD REDONE BY BELKIN { for(new i=1; i < MAX_FUEL_STATIONS; i++) { if(FuelStationCreated[i]) { if(IsPlayerInRangeOfPoint(playerid, 15.0, FuelStationPos[i][0], FuelStationPos[i][1], FuelStationPos[i][2])) { if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in an vehicle!"); if (isrefuelling[playerid]) return SendClientMessage(playerid,0xFFC800FF,"refuelling your vehicle!"); if(!IsACop(playerid) || !IsAGov(playerid) || !IsMedic(playerid)) { GivePlayerCash(playerid, -0); } GivePlayerCash(playerid, -100); //Sets the player's cash -$100 SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid,0); isrefuelling[playerid] = 1; TextDrawSetString(td_fuel[playerid],"Refuelling..."); SetTimerEx("timer_refuel",4500,false,"i",playerid); } } } SendClientMessage(playerid, COLOR_RED, "You are not in a fuel station!"); return 1; }