Bug with two different TextDraws !
#1

Hello everyone,

So I have SpeedoMeter TextDraw in GameMode
pawn Код:
new Text:SPEEDOX[MAX_PLAYERS]
& Announcement TextDraw in FilterScript
pawn Код:
new Text:Announcements;
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
Reply
#2

Lets See the TD code.

Peace...
Reply
#3

What is TD code ? please
Reply
#4

Bump
Reply
#5

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
Reply
#6

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
Reply
#7

In what function do you call TextDrawShowForPlayer?
Reply
#8

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.
Reply
#9

@Gabe: If player enter = Showtextdraw, and the opposite
@Vince: I'll try
Reply
#10

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 !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)