10.04.2016, 19:11
Hey guys
Speedometer alone = Works
Fuel meter alone = Works
Together = Crash
(Ignore Speedcheck)
Speedometer alone = Works
Fuel meter alone = Works
Together = Crash
(Ignore Speedcheck)
PHP код:
// Speedometer
if(Speedo[playerid] && fMeter[playerid] && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new string[128], speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r-Speedometer: ~w~%d MPH ~r~Fuel: ~w~ %d%", speed, Fuel[GetPlayerVehicleID(playerid)]);
GameTextForPlayer(playerid, string, 1000, 3);
}
if(Speedo[playerid] == 1 && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !fMeter[playerid])
{
new string[64], speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Speedometer: ~w~%d MPH", speed);
GameTextForPlayer(playerid, string,1000, 3);
}
// SpeedCheck
if(IsPlayerInAnyVehicle(playerid) && IsAAdmin(playerid) && IsAFlight(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
if(speed > 205 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 519 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 553 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 592 && IsAAdmin(playerid) || speed > 240)
{
new string[128];
format(string, sizeof(string), "AdmWarn: %s might be using speed hacks (%d MPH)", RPN(playerid), speed);
SendAdminMessage(COLOR_DARKRED, 1, string);
}
}
// Fuel
if(fMeter[playerid] == 1 && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !Speedo[playerid])
{
new string[64];
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Fuel: ~w~%d%", Fuel[GetPlayerVehicleID(playerid)]);
GameTextForPlayer(playerid, string,1000, 3);
}