TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 581.999938, 427.440002, "CURRENT_XP"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.190799, 0.878222); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][1], -117.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1378294017); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 3); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
Use PlayerTextDrawSetString If the string is numeric or something, if its a bar you've to play with the size.
https://sampwiki.blast.hk/wiki/PlayerTextDrawSetString If the wanted its with stars, can make some textdraws corresponding with the number of your wanted, Ex if its 6 make 6 texdraws, 1 with 1 star, another with 2, next with 3, and everything, then you use PlayerTextdrawShow according the wanted level, but if its numeric or a bar, do the same as the xp system https://sampwiki.blast.hk/wiki/PlayerTextDrawShow |
format(xpbar, sizeof(xpbar), "0000%d", pInfo[playerid][pXP] CreatePlayerTextDraw(playerid, 582.399719, 433.413482, xpbar);
I've made it as a TEXTDRAW, i'm using format for XP
like Код:
format(xpbar, sizeof(xpbar), "0000%d", pInfo[playerid][pXP] CreatePlayerTextDraw(playerid, 582.399719, 433.413482, xpbar); |
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][1], xpbar);
But it's not showing any textdraw.. not even a single, even if the textdraw contains a text "CURRENT XP"
|
new PlayerText:TDEditor_PTD[MAX_PLAYERS][5];
new xpbar[14]; format(xpbar, sizeof(xpbar), "0000%d~n~", pInfo[playerid][pXP]); TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 582.399719, 433.413482, xpbar); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.217200, 1.343066); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][0], 295.000000, 0.250000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1378294017); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 3); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 0); TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 581.999938, 427.440002, "CURRENT_XP"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.190799, 0.878222); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][1], -117.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1378294017); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 3); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1); // PlayerTextDrawSetString(playerid, TDEDITOR_PTD[playerid][0], xpbar) PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][0], xpbar); TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 578.401123, 123.297912, "[] []"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.355600, 2.048001); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][2], -225.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 3); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -5963521); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 0); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1); TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 492.801116, 99.302291, "[][][][][][]"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.309600, 2.192178); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][3], -111.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -5963521); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 1); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], 0); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 1); new wlvl[24]; format(wlvl, 24, "%s", pInfo[playerid][pWanted]); TDEditor_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 548.800109, 123.297790, wlvl); //for wanted level displaying PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][4], 0.396799, 1.838933); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][4], -7.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][4], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][4], -5963521); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], -1); PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][4], 2); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][4], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][4], 2); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][4], 1);