09.08.2013, 16:43
Who can help change my speedometer to this.
http://i36.tinypic.com/w8235i.png
/imageshack/img824/1108/screenkv.png
And ad there fuel.
http://i36.tinypic.com/w8235i.png
/imageshack/img824/1108/screenkv.png
PHP код:
new currentspeed = GetPlayerSpeed(i,false);
if(gSpeedo[i] == 1 && gSpeedoOn[i] == 1)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
if (Engine[GetPlayerVehicleID(i)] == 1)
{
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~b~mph:~w~ %.0f", player_get_speed(i));
GameTextForPlayer(i, string, 1500, 5);
}
}
}
PHP код:
public CheckGas()
{
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(i);
if(IsNonFuelVehicle(vehicle)) { return 1; }
if (!Engine[vehicle]) return 1;
if(Gas[vehicle] >= 1)
{
if(Gas[vehicle] == 5 || Gas[vehicle] == 10 || Gas[vehicle] == 15) SendClientMessage(i,RED,"GPS: Your vehicle is almost out of fuel, please visit a gas station.");
if(gGas[i] == 1 && gSpeedoOn[i] == 0)
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d Percent",Gas[vehicle]);
GameTextForPlayer(i,string,15500,3); }
Gas[vehicle]--;
}
else
{
//NoFuel[i] = 1;
//TogglePlayerControllable(i, 1);
//RemovePlayerFromVehicle(i); // fuck yeah
SetVehicleEngine(vehicle, 0);
//GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle~n~Use /exit to leave the vehicle",1500,3);
SendClientMessage(i, LIGHTRED, "There is no fuel left in the vehicle.");
}
}
}
}
return 1;
}