{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ N/A");
}
else
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
}
GameTextForPlayer(i,string,20500,3); }
{
if(distance <10)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
if(distance > 10 && distance < 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
if(distance > 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
GameTextForPlayer(i, string, 2000, 5);
}
GameTextForPlayer(i, string, 2000, 5);
|
Originally Posted by Mr_FinnigaN
Код:
GameTextForPlayer(i, string, 2000, 5); |
|
Originally Posted by Cake.
hmm so what shuld i do
|

|
Originally Posted by Cake.
So i have a problem i dont know how to solve so i hope you may help me with this.
the thing i need help with is Speedo meter and fuel When i enter a vehicle the Speed pops up and after a while the fuel pops up and just dissipairs how to fix this so both is visible Here is the fuel code Код:
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ N/A");
}
else
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
}
GameTextForPlayer(i,string,20500,3); }
Код:
{
if(distance <10)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
if(distance > 10 && distance < 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
if(distance > 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
GameTextForPlayer(i, string, 2000, 5);
}
|
GameTextForPlayer(i,string,20500,3); }
GameTextForPlayer(i, string, 2000, 5);
GameTextForPlayer(i,string,99999999,3); }
GameTextForPlayer(i, string, 99999999, 5);
|
Originally Posted by Cake.
dint work
|
public OtherTimer()
{
new Float:maxspeed = 500.0;
new plname[MAX_PLAYER_NAME];
new string[256];
new Float:oldposx, Float:oldposy, Float:oldposz
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (GetPlayerState(i) == 1) CheckForWalkingTeleport(i); // IF THE PLAYER IS IN A TELEPORT ZONE, TELEPORT THEM
new vehicleid = GetPlayerVehicleID(i);
if(SafeTime[i] > 0)
{
SafeTime[i]--;
}
if(SafeTime[i] == 1)
{
if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
{
SendClientMessage(i, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
}
}
if(GetPlayerState(i) == 2)
{
GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
if(TelePos[i][5] > 550.0)
{
TelePos[i][0] = 0.0;
TelePos[i][1] = 0.0;
}
if(TelePos[i][0] != 0.0)
{
new Float:xdist = TelePos[i][3]-TelePos[i][0];
new Float:ydist = TelePos[i][4]-TelePos[i][1];
new Float:sqxdist = xdist*xdist;
new Float:sqydist = ydist*ydist;
new Float:distance = (sqxdist+sqydist)/31;
if ((BusrouteEast[i][0] == 0 && BusrouteWest[i][0] == 0))
{
if(gSpeedo[i] == 2)
{
if(distance <10)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
if(distance > 10 && distance < 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
if(distance > 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~speed : ~w~%.0f",distance);
}
GameTextForPlayer(i, string, 99999999, 5);
}
if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
{
new tmpcar = GetPlayerVehicleID(i);
if(!IsAPlane(tmpcar))
{
GetPlayerName(i, plname, sizeof(plname));
format(string, 256, "AdmWarning: [%d]%s %.0f speed",i,plname,distance);
ABroadCast(COLOR_YELLOW,string,1);
}
}
}
}
if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
{
TelePos[i][0] = TelePos[i][3];
TelePos[i][1] = TelePos[i][4];
}
}
if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
{
new house = PlayerInfo[i][pLocal];
GetPlayerPos(i, oldposx, oldposy, oldposz);
if(oldposz != 0.0)
{
if(oldposz < 600.0)
public CheckGas()
{
new string[256];
new playerid
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(i);
if(Gas[vehicle] >= 1)
{
if(Gas[vehicle] <= 10)
{
PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
if(gGas[i] == 0) {
GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~Fuel is low",5000,3);
}
}
if(gGas[i] == 1) {
if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle))
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ N/A");
}
else
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
}
GameTextForPlayer(i,string,99999999,3); }
if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || engineOn[vehicle] == 0) { Gas[vehicle]++; }
Gas[vehicle]--;
}
else
{
NoFuel[i] = 1;
TogglePlayerControllable(i, 0);
GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle",1500,3);
}
}
}
}
return 1;
}