Some problems.
#1

Ok, im have some problems, with TD, and another shit....

So, i downloaded some speedometer.. Added it to gamemode. No errors, but no td, when i enter the car.. And, there is the script:
new Text:Spidometras[MAX_PLAYERS]; <--- Top of script
KrautiTextDrawus(); <--- OnGameModeInit
SetTimer("PagrindinisTimer", 1000, true); <---- OnGameModeInit
Quote:

KrautiTextDrawus()
{
foreach(Player, i)
{
Spidometras[i] = TextDrawCreate(200.000000,390.000000,"0");
TextDrawAlignment(Spidometras[i],0);
TextDrawBackgroundColor(Spidometras[i],0x000000ff);
TextDrawFont(Spidometras[i],1);
TextDrawLetterSize(Spidometras[i],0.455555,1.000000);
TextDrawColor(Spidometras[i],0xffffffff);
TextDrawSetOutline(Spidometras[i],1);
TextDrawSetProportional(Spidometras[i],1);
TextDrawSetShadow(Spidometras[i],1);
}
return 1;
}

<--- Anywhere
Quote:

public PagrindinisTimer()
{
foreach(Player, ID)
{
Some another shit..
if(IsPlayerInAnyVehicle(ID) && GetPlayerState(ID) == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(ID,Spidometras[ID]);
if(MasinosID != BMX && MasinosID != MTBIKE && MasinosID != BIKE) format(Stringas,65,"~r~Greitis: ~w~%ikm/h ~r~Degalai: ~w~%i ~n~ ",ZaidejoGreitis(ID),vehicleDB[MasinosID][gas]);
else format(Stringas,45,"~r~Greitis: ~w~%ikm/h",ZaidejoGreitis(ID));
TextDrawSetString(Spidometras[ID],Stringas);
}
... another shit

Reply
#2

Did it show any warnings when compiling?
Reply
#3

Nop. 8chars
Reply
#4

use pawn /pawn in the future when posting your scripts, its hard to look at it right now, but from experience,
i dont see anywhere in your code the TextDrawShowForPlayer which actualy makes the textdraw to show.
Reply
#5

lol yea
good eyes..
Reply
#6

[pawno]if(IsPlayerInAnyVehicle(ID) && GetPlayerState(ID) == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(ID,Spidometras[ID]);[/pawno]
Reply
#7

try this
pawn Код:
public PagrindinisTimer(){
    for(new i=0;i<MAX_PLAYERES;i++){
        if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER){
            if(MasinosID != BMX && MasinosID != MTBIKE && MasinosID != BIKE) format(Stringas,65,"~r~Greitis: ~w~%ikm/h ~r~Degalai: ~w~%i ~n~ ",ZaidejoGreitis(ID),vehicleDB[MasinosID][gas]);
            else format(Stringas,45,"~r~Greitis: ~w~%ikm/h",ZaidejoGreitis(ID));
            TextDrawSetString(Spidometras[i],Stringas);
            TextDrawShowForPlayer(i,Spidometras[i]);
        }
    }
}
Reply
#8

Nah, didnt working.
Reply
#9

BUMP! Whats wrong with this speedo?..
Reply
#10

Bump. ; X
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)