Bug with two different TextDraws ! -
Yaszine - 24.01.2011
Hello everyone,
So I have SpeedoMeter TextDraw in GameMode
pawn Код:
new Text:SPEEDOX[MAX_PLAYERS]
& Announcement TextDraw in FilterScript
If I enter a car, normally will show the dashboard but it show me announcement.
and if I exit the car will hidden!
The announcement should show at everystates (incar onfoot...) when player spawn
and dash will show only incar ~
How can I fix that
Please reply
Thanks as begin
Re: Bug with two different TextDraws ! -
Stigg - 24.01.2011
Lets See the TD code.
Peace...
Re: Bug with two different TextDraws ! -
Yaszine - 24.01.2011
What is TD code ? please
Re : Bug with two different TextDraws ! -
Yaszine - 24.01.2011
Bump
Re: Bug with two different TextDraws ! - Larsey123IsMe - 24.01.2011
Quote:
Originally Posted by Yaszine
What is TD code ? please
|
TD = TextDraw
Code = Script/Code
TD Code = TestDraw Code...
With other words, Hes asking you to post your TextDraw code here.
How? Use:
[ PAWN ] <---Without spaces
//Code
[/ PAWN] <---Without spaces
Re : Bug with two different TextDraws ! -
Yaszine - 24.01.2011
xD just I don't know the TD mean, the other
of course
The SpeedoMeter TextDraw is OnGameModeInit under the AddStaticVehicles !
pawn Код:
new playerid;
new vehicleid; vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, vh);
GetVehicleVelocity(vehicleid,Sp_x,Sp_y,Sp_z);
f_speed = floatsqroot(((Sp_x*Sp_x)+(Sp_y*Sp_y))+(Sp_z*Sp_z))*136.666667; /* & MPH = 85.4166672*/
f_speed_int = floatround(f_speed,floatround_round);
format(S_string,256,"~g~Vehicule : ~w~%s ~n~~g~~h~~h~Ping : ~w~%d / ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f",Vehiclex[GetVehicleModel(vehicleid)-400],GetPlayerPing(playerid),f_speed_int,vh);
SPEEDOX[playerid] = TextDrawCreate(320.00, 380.00, S_string);
TextDrawSetOutline(SPEEDOX[playerid], 1);
TextDrawFont(SPEEDOX[playerid], 3);
TextDrawSetProportional(SPEEDOX[playerid], 2);
TextDrawAlignment(SPEEDOX[playerid], 2);
TextDrawLetterSize(SPEEDOX[playerid],0.29,0.83);
TextDrawSetShadow(SPEEDOX[playerid],0);
This is what I script, the TextDraw of announcement is in an Admin FS
Re: Bug with two different TextDraws ! -
Gabe - 24.01.2011
In what function do you call TextDrawShowForPlayer?
Re: Re : Bug with two different TextDraws ! -
Vince - 24.01.2011
Quote:
Originally Posted by Yaszine
The SpeedoMeter TextDraw is OnGameModeInit under the AddStaticVehicles !
|
No, no, no. OnGameModeInit doesn't have a playerid parameter for a reason! Create per-player textdraws under OnPlayerConnect and make sure to destroy them again at OnPlayerDisconnect to prevent an overload of textdraws.
Re : Bug with two different TextDraws ! -
Yaszine - 24.01.2011
@Gabe: If player enter = Showtextdraw, and the opposite
@Vince: I'll try
Re : Bug with two different TextDraws ! -
Yaszine - 24.01.2011
I have changed the TextDraw info from
OnGameModeInit to
OnPlayerConnect
But, it still the same BUG, enter car = show announcement, exit = hide them
and no Speedo TextDraw shown
Soo !!