[Ajuda] Combustivel
#1

Este combustivel estas assim, quando estou sozinho em meu servidor ele nгo altera (Exemplo: meu combustivel й 30), ai estas tudo ok, entrou um novo player no meu servidor (45 combustivel), pegou um carro ai cada um ta em seu carro, o combustivel fica trocando, estas 30 meu combustivel normal e depois vб pra 45 (combustivel do player que entrou no servidor), ai se tem mais de 10 pessoas no servidor fica alterando sem parar, acham que tem algo haver com playerd?

pawn Код:
public Velocimetro()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            AtualizarInfos(i);
            new aname[MAX_PLAYER_NAME];
            GetPlayerName(i, aname, MAX_PLAYER_NAME);
            if (IsPlayerInAnyVehicle(i))
            {
                new Float: X,
                Float: Y,
                Float: Z,
                Float: Speed;
                GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
                Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 200.0);
                new velocid;
                velocid = floatround(Speed, floatround_floor);
                new string[256];
                new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
                PlayerVehicleModelID -= 400;
                format(string, 256, "~n~      ~b~ ~h~ ~h~Velocidade~n~        ~w~ %i ~w~~h~~h~Km/H ~n~~n~      ~b~ ~h~ ~h~Combustivel~n~      ~w~ ~h~ ~h~ %d Litros", velocid, dini_Int(file, "Combustivel"));
                TextDrawSetString(velo[i], string);
                Radar(i);
                TextDrawShowForPlayer(i, velo[i]);
            }
            else TextDrawHideForPlayer(i, velo[i]);
        }
        else
        {
            TextDrawHideForPlayer(i, velo[i]);
        }
    }
}
Obs: Nгo sou o artheny --
Reply
#2

Vocк , colou dentro do ongamemodeinit?
Reply
#3

Quote:
Originally Posted by Sampizito
Посмотреть сообщение
Vocк , colou dentro do ongamemodeinit?
Uma Public, dentro de OnGameModeInit?
Reply
#4

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Uma Public, dentro de OnGameModeInit?
Por isso tou perguntando '-' osh
Reply
#5

Esse carinha й o anthnery... sempre perguntando esta mesma merda... se nгo й ele, й um dos amigos dele.

Entгo, eu NГO vou ajudar. Espero que todos os outros desta board faзam o mesmo !
Reply
#6

@off
anthnery , e aquele que fez o lanзe do tubarгo que saiu falando bobeira pra todos?
Reply
#7

Sim... Este carinha mesmo... mу otбrio .
Reply
#8

Crie uma timer do velocimetro.
E coloque-a no ongamemodeinit.
Reply
#9

entao mais como eu faзo isso brazucas?
poderia me mandar seu contato para vocк me ajudar?

Por favor..

@Aguardo
Reply
#10

Jб disse em outro tуpico que deve estar com problema por ser SetTimer e nгo SetTimerEx, o certo deveria ser Velocimetro(playerid), e nгo Velocimetro(), buga porque cada hora pega a gasolina do carro de um player diferente.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)