Some problems. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some problems. (
/showthread.php?tid=187964)
Some problems. -
Gh0sT_ - 05.11.2010
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
|
Re: Some problems. -
Abraham2nd - 05.11.2010
Did it show any warnings when compiling?
Re: Some problems. -
Gh0sT_ - 05.11.2010
Nop. 8chars
Re: Some problems. -
OldDirtyBastard - 05.11.2010
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.
Re: Some problems. -
Abraham2nd - 05.11.2010
lol yea
good eyes..
Re: Some problems. -
Gh0sT_ - 05.11.2010
[pawno]if(IsPlayerInAnyVehicle(ID) && GetPlayerState(ID) == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(ID,Spidometras[ID]);[/pawno]
Re: Some problems. -
(SF)Noobanatior - 05.11.2010
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]);
}
}
}
Re: Some problems. -
Gh0sT_ - 05.11.2010
Nah, didnt working.
Re: Some problems. -
Gh0sT_ - 06.11.2010
BUMP! Whats wrong with this speedo?..
Re: Some problems. -
AndriusZ* - 06.11.2010
Bump. ; X