Speedometer
#1

Who can help change my speedometer to this.
http://i36.tinypic.com/w8235i.png
/imageshack/img824/1108/screenkv.png

PHP код:
            new currentspeed GetPlayerSpeed(i,false);
            if(
gSpeedo[i] == && gSpeedoOn[i] == 1)
            {
                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)
                {
                    if (
Engine[GetPlayerVehicleID(i)] == 1)
                    {
                        
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~b~mph:~w~ %.0f"player_get_speed(i));
                        
GameTextForPlayer(istring15005);
                    }
                }
            } 
And ad there fuel.

PHP код:
public CheckGas()
{
    new 
string[128];
    for(new 
0MAX_PLAYERSi++)
    {
        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] == || Gas[vehicle] == 10 || Gas[vehicle] == 15SendClientMessage(i,RED,"GPS: Your vehicle is almost out of fuel, please visit a gas station.");
                       if(
gGas[i] == && gSpeedoOn[i] == 0)
                       {
                      
format(stringsizeof(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(vehicle0);
                    
//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(iLIGHTRED"There is no fuel left in the vehicle.");
                }
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)