SA-MP Forums Archive
[HELP] Textdraw - 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: [HELP] Textdraw (/showthread.php?tid=178275)



[HELP] Textdraw - NotoriousMOB - 21.09.2010

I can't get it to be like the second picture help !!



Код:
                new String[128];
                new Float:X, Float:Y, Float:Z, Float:Speed;
                new vehicle = GetPlayerVehicleID(i);
                GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
                Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 100.0);
                format(String,sizeof(String),"~b~~n~~r~Fuel: ~w~%i~n~~r~Mp/h: ~w~%i", Gas[vehicle], floatround(Speed, floatround_floor));
                if(VHSCreated[i] == true)
                {
                    TextDrawDestroy(VHS[i]);
                }
                VHS[i] = TextDrawCreate(496.000000,100.000000,String);
                TextDrawFont(VHS[i],1);
                TextDrawLetterSize(VHS[i],0.360000, 1.000000);
                TextDrawColor(VHS[i],0xffffffff);
                TextDrawSetProportional(VHS[i],1);
                TextDrawSetShadow(VHS[i],1);
                TextDrawBackgroundColor(VHS[i], 255);
                TextDrawUseBox(VHS[i], 0);
                TextDrawShowForPlayer(i, VHS[i]);
                VHSCreated[i] = true;



Re: [HELP] Textdraw - Tekto - 21.09.2010

Код:
format(String,sizeof(String),"~b~~n~~r~Fuel: ~w~%i ~r~Mp/h: ~w~%i", Gas[vehicle], floatround(Speed, floatround_floor));



Re: [HELP] Textdraw - NotoriousMOB - 21.09.2010

Thanks alot man !


Re: [HELP] Textdraw - NotoriousMOB - 21.09.2010

Strange how come when you get out of the vehicle the fuel and mp/h still appears.


Re: [HELP] Textdraw - Tekto - 21.09.2010

Add textdraw hide function on OnVehicleExit.


Re: [HELP] Textdraw - NotoriousMOB - 21.09.2010

Oh nothing working ! xD