09.09.2013, 21:19
Tenta:
pawn Код:
if(GetPlayerState(i) != PLAYER_STATE_DRIVER || Fuel[vehicleid] >= 100.0 || GetPlayerMoney(i) < cost
|| !IsPlayerInRangeOfPoint(i, 10.0, FuelStationPos[stationid][0], FuelStationPos[stationid][1], FuelStationPos[stationid][2]))
{
if(GetPlayerMoney(i) < cost) cost = GetPlayerMoney(i);
GivePlayerMoney(i, -cost);
format(string, sizeof(string), "~r~-$%d", cost);
GameTextForPlayer(i, string, 2000, 3);
format(string, sizeof(string), "Vocк pagou $%d pelo combustivel.", cost);
SendClientMessage(i, COLOR_WHITE, string);
SetPVarInt(i, "FuelStation", 0);
SetPVarFloat(i, "Fuel", 0.0);
}