TextDraw Problem !
#1

Hello everyone
So, I have UpdateSpeedo(); OnPlayerConnect

This is it:
pawn Код:
UpdateSpeed()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
            new Float:Sp_x, Float:Sp_y, Float:Sp_z, Float:f_speed, f_speed_int;
            new S_string[256];
            new Float:vh;
            new vehicleid;
            vehicleid = GetPlayerVehicleID(i);
            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(i),f_speed_int,vh);
            Speedox[i] = TextDrawCreate(320.00, 380.00, S_string);
            TextDrawSetOutline(Speedox[i], 1);
            TextDrawFont(Speedox[i], 3);
            TextDrawSetProportional(Speedox[i], 2);
            TextDrawAlignment(Speedox[i], 2);
            //TextDrawLetterSize(Speedox[i],0.29,0.83);
            TextDrawSetShadow(Speedox[i],0);
    }
   
}
If player connect to server, the text draw not works (SpeedoMeter if he take a car should show but .. ?!)
How can I place it under OnGameModeInit ?!
Because there is "playerid" and many other functions that OnGameModeInit not support
PS: And how can the TextDraw created change if KM/h ~ Ping .. changed ?

Thanks very much
Reply
#2

Anyone
Reply
#3

You need to use SetTimerEx() under OnPlayerConnect to call the function all the time
Reply
#4

Yes I'll do, but where can I put the TextDraw creation ?
Reply
#5

Please
Reply
#6

TextDrawShowForPlayer Perhaps.


Peace...
Reply
#7

Quote:
Originally Posted by Stigg
Посмотреть сообщение
TextDrawShowForPlayer Perhaps.


Peace...
How can I place it under OnGameModeInit ?!
Reply
#8

I have tested TextDrawShowForPlayer but nothing shown !
Reply
#9

SomeOne ?
Reply
#10

Please Urgent !
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)