19.06.2012, 01:37
Put this code anywhere but not inside a function or something, after your includes and such as for sure:
pawn Код:
CMD:refuel(playerid, params[])
{
if (!IsPlayerAtRefuelStation(playerid)) return SendClientMessage(playerid,COLOR_INDIANRED,"You are not on a fuel station.");
if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_INDIANRED,"You are not in a vehicle!");
if (isrefuelling[playerid]) return SendClientMessage(playerid,COLOR_INDIANRED,"You are already refuelling!");
if (GetPlayerMoney(playerid) - 80 <0) return SendClientMessage(playerid,COLOR_INDIANRED,"You dont have enough money!");
GivePlayerMoney(playerid,-80);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,0);
isrefuelling[playerid] = 1;
TextDrawSetString(td_fuel[playerid],"Refuelling...");
SetTimerEx("timer_refuel",4500,false,"i",playerid);
return 1;
}