[Ajuda] pls
#2

Coloque em OnGameModeInit em vez de OnPlayerConnect

pawn Код:
new TemVelo[MAX_PLAYERS] = 0;

if(TemVelo[playerid] == 1)
{
    velo[playerid] = TextDrawCreate(-16,300, " ");
    TextDrawBackgroundColor(velo[playerid], 0x000000FF);
    TextDrawColor(velo[playerid], 0xFFFFFFFF);
    TextDrawSetOutline(velo[playerid], 1);
    TextDrawFont(velo[playerid], 1);
    TextDrawHideForPlayer(playerid, velo[playerid]);
    return 1;
    }
    }

public Velocimetro()
{
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(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))), 129.0);
                new velocid;
                velocid = floatround(Speed, floatround_floor);
                new string[256];
                new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
                PlayerVehicleModelID -= 400;
                dini_IntSet(file, "Velocimetro1", 1);
                format(string, 256,"~n~        ~b~ %i ~w~KM/H",velocid);
                TextDrawSetString(velo[i],string);
                TextDrawShowForPlayer(i,velo[i]);
            } else TextDrawHideForPlayer(i, velo[i]);
        }
        else {
            TextDrawHideForPlayer(i, velo[i]);
        }
    }
}
Reply


Messages In This Thread
pls - by Cromado - 09.06.2013, 15:28
Re: pls - by feliphemort - 09.06.2013, 15:37
Re: pls - by HugoCrown - 09.06.2013, 15:44
Re: pls - by feliphemort - 09.06.2013, 15:48
Re: pls - by Cromado - 09.06.2013, 16:17
Re: pls - by Cromado - 09.06.2013, 16:25
Re: pls - by MonFiTy - 09.06.2013, 16:36
Re: pls - by Cromado - 09.06.2013, 16:43
Re: pls - by Cromado - 09.06.2013, 19:20
Re: pls - by feliphemort - 09.06.2013, 19:27

Forum Jump:


Users browsing this thread: