SA-MP Forums Archive
2 textdraws at the same time ? - 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: 2 textdraws at the same time ? (/showthread.php?tid=180268)



2 textdraws at the same time ? - martynas - 30.09.2010

Hi,


I have one problem... i can't see 2 textdraws at the same time this is code :

Quote:

SPEEDOS[playerid] = TextDrawCreate(254.000000, 400.000000, "_");
TextDrawBackgroundColor(SPEEDOS[playerid], 0x000000ff);
TextDrawFont(SPEEDOS[playerid], 2);
TextDrawLetterSize(SPEEDOS[playerid], 0.2300, 0.8999);
TextDrawColor(SPEEDOS[playerid], -1);
TextDrawSetOutline(SPEEDOS[playerid], 1);
TextDrawSetProportional(SPEEDOS[playerid], 1);
TextDrawUseBox(SPEEDOS[playerid], 1);
TextDrawBoxColor(SPEEDOS[playerid], 0x00000099);
TextDrawTextSize(SPEEDOS[playerid], 405.000000, 0.000000);

new model = GetVehicleModel(GetPlayerVehicleID(playerid));
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed _z);
final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+ (speed_z*speed_z))*216.666667; // 136.666667 = kmph // 85.4166672= mph
final_speed_int = floatround(final_speed,floatround_round);
format(speed_string,256,"%s ~h~Vehicle: %s~n~ ~h~Speed: ~w~%i KM/h~n~ ~h~Health: %s%", VehicleNames[model-400], final_speed_int, masinosbukle);


new Textpidos;

spidos = TextDrawCreate(254.000000, 360.000000, "LSRG.lt Spidometras");
TextDrawFont(spidos, 3);
TextDrawLetterSize(spidometras, 0.390000, 0.899999);
TextDrawColor(spidos, -1);
TextDrawSetOutline(spidos, 1);
TextDrawSetProportional(spidos, 1);
TextDrawTextSize(spidos, 405.000000, 0.000000);

TextDrawShowForPlayer(playerid,spidos);
TextDrawSetString(SPEEDOS[playerid], speed_string);

i see only textdraw spidos whats wrong ?


Re: 2 textdraws at the same time ? - [MWR]Blood - 30.09.2010

pawn Код:
TextDrawShowForPlayer(playerid,spidos);
TextDrawSetString(SPEEDOS[playerid], speed_string);
TextDrawShowForPlayer(playerid,SPEEDOS[playerid]);