09.10.2012, 12:07
pawn Код:
new Float:gx, Float:gy, Float:gz;
for(new i = 0; i < sizeof(GasStation); i++)
{
gx = GasStation[i][0];
gy = GasStation[i][1];
gz = GasStation[i][2];
}
SetPlayerMapIcon(playerid, 0, gx, gy, gz, 56, COLOR_WHITE, MAPICON_LOCAL);
pawn Код:
new Float:gx, Float:gy, Float:gz;
for(new i = 0; i < sizeof(GasStation); i++)
{
gx = GasStation[i][0];
gy = GasStation[i][1];
gz = GasStation[i][2];
SetPlayerMapIcon(playerid, 0, gx, gy, gz, 56, COLOR_WHITE, MAPICON_LOCAL);
}
pawn Код:
for(new i = 0; i < sizeof(GasStation); i++)
{
x = GasStation[i][0];
y = GasStation[i][1];
z = GasStation[i][2];
if(IsPlayerInRangeOfPoint(playerid, 2.5, x, y, z) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(isrefuelling[playerid]) return SendClientMessage(playerid, COLOR_RED, "You are already refuelling!");
if (GetPlayerMoney(playerid) - 80 < 0) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to refuel!");
GivePlayerMoney(playerid, -80);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
isrefuelling[playerid] = 1;
TextDrawSetString(td_fuel[playerid], "Refuelling...");
GameTextForPlayer(playerid, "~r~Refuelling...~n~~w~Please wait!", 5000, 3);
SetTimerEx("VehicleRefuel", 5000, false, "i", playerid);
}
else if(!IsPlayerInRangeOfPoint(playerid, 2.5, x, y, z)) return SendClientMessage(playerid, COLOR_RED, "You are not in any Gas Stations!");
}