[Ajuda] TEXTDRAW BUGADO
#1

Bom, fiz esse rodapй em textdraw, porйm como podem ver estб aparecendo tudo "0", e o Nick nгo aparece nada.
Print: https://imgur.com/a/1TDAqoi

Cуdigo:

pawn Code:
ro1 = TextDrawCreate(641.529418, 423.250000, "usebox");
    TextDrawLetterSize(ro1, 0.000000, 2.535187);
    TextDrawTextSize(ro1, -2.000000, 0.000000);
    TextDrawAlignment(ro1, 1);
    TextDrawColor(ro1, 0);
    TextDrawUseBox(ro1, true);
    TextDrawBoxColor(ro1, 170);
    TextDrawSetShadow(ro1, 0);
    TextDrawSetOutline(ro1, 0);
    TextDrawFont(ro1, 0);

    ro2 = TextDrawCreate(10.823518, 428.749969, "ID:");
    TextDrawLetterSize(ro2, 0.449999, 1.600000);
    TextDrawAlignment(ro2, 1);
    TextDrawColor(ro2, -16776961);
    TextDrawSetShadow(ro2, 0);
    TextDrawSetOutline(ro2, 0);
    TextDrawBackgroundColor(ro2, 51);
    TextDrawFont(ro2, 1);
    TextDrawSetProportional(ro2, 1);

    ro3 = TextDrawCreate(127.529457, 428.166564, "R$:");
    TextDrawLetterSize(ro3, 0.449999, 1.600000);
    TextDrawAlignment(ro3, 1);
    TextDrawColor(ro3, 8388863);
    TextDrawSetShadow(ro3, 0);
    TextDrawSetOutline(ro3, 1);
    TextDrawBackgroundColor(ro3, 51);
    TextDrawFont(ro3, 1);
    TextDrawSetProportional(ro3, 1);

    ro4 = TextDrawCreate(255.048370, 428.166595, "NICK:");
    TextDrawLetterSize(ro4, 0.449999, 1.600000);
    TextDrawAlignment(ro4, 1);
    TextDrawColor(ro4, -65281);
    TextDrawSetShadow(ro4, 0);
    TextDrawSetOutline(ro4, 1);
    TextDrawBackgroundColor(ro4, 51);
    TextDrawFont(ro4, 1);
    TextDrawSetProportional(ro4, 1);

    ro5 = TextDrawCreate(406.824035, 428.166748, "LEVEL:");
    TextDrawLetterSize(ro5, 0.449999, 1.600000);
    TextDrawAlignment(ro5, 1);
    TextDrawColor(ro5, 65535);
    TextDrawSetShadow(ro5, 0);
    TextDrawSetOutline(ro5, 1);
    TextDrawBackgroundColor(ro5, 51);
    TextDrawFont(ro5, 1);
    TextDrawSetProportional(ro5, 1);

    ro6 = TextDrawCreate(553.411193, 427.583251, "VIP:");
    TextDrawLetterSize(ro6, 0.449999, 1.600000);
    TextDrawAlignment(ro6, 1);
    TextDrawColor(ro6, -2147450625);
    TextDrawSetShadow(ro6, 0);
    TextDrawSetOutline(ro6, 1);
    TextDrawBackgroundColor(ro6, 51);
    TextDrawFont(ro6, 1);
    TextDrawSetProportional(ro6, 1);

    ro7 = TextDrawCreate(503.058441, 394.917114, "www.brasilcidadevirtual.tk");
    TextDrawLetterSize(ro7, 0.264588, 1.535833);
    TextDrawAlignment(ro7, 1);
    TextDrawColor(ro7, 16777215);
    TextDrawSetShadow(ro7, 0);
    TextDrawSetOutline(ro7, 1);
    TextDrawBackgroundColor(ro7, 51);
    TextDrawFont(ro7, 3);
    TextDrawSetProportional(ro7, 1);

    new str1[10];
    format(str1, sizeof(str1), "%d", playerid);
    ro8 = TextDrawCreate(39.999992, 428.166687, str1);
    TextDrawLetterSize(ro8, 0.449999, 1.600000);
    TextDrawAlignment(ro8, 1);
    TextDrawColor(ro8, -1);
    TextDrawSetShadow(ro8, 0);
    TextDrawSetOutline(ro8, 1);
    TextDrawBackgroundColor(ro8, 51);
    TextDrawFont(ro8, 1);
    TextDrawSetProportional(ro8, 1);

    new str2[100];
    format(str2, sizeof(str2), "%d", GetPlayerGrana(playerid));
    ro9 = TextDrawCreate(160.941192, 427.583251, str2);
    TextDrawLetterSize(ro9, 0.449999, 1.600000);
    TextDrawAlignment(ro9, 1);
    TextDrawColor(ro9, -1);
    TextDrawSetShadow(ro9, 0);
    TextDrawSetOutline(ro9, 1);
    TextDrawBackgroundColor(ro9, 51);
    TextDrawFont(ro9, 1);
    TextDrawSetProportional(ro9, 1);

    new str3[100];
    format(str3, sizeof(str3), "%s", PlayerName(playerid));
    ro10 = TextDrawCreate(306.823608, 427.583374, str3);
    TextDrawLetterSize(ro10, 0.449999, 1.600000);
    TextDrawAlignment(ro10, 1);
    TextDrawColor(ro10, -1);
    TextDrawSetShadow(ro10, 0);
    TextDrawSetOutline(ro10, 1);
    TextDrawBackgroundColor(ro10, 51);
    TextDrawFont(ro10, 1);
    TextDrawSetProportional(ro10, 1);

    new str4[100];
    format(str4, sizeof(str4), "%d", dini_Int(file, "Level"));
    ro11 = TextDrawCreate(461.647186, 427.583312, str4);
    TextDrawLetterSize(ro11, 0.449999, 1.600000);
    TextDrawAlignment(ro11, 1);
    TextDrawColor(ro11, -1);
    TextDrawSetShadow(ro11, 0);
    TextDrawSetOutline(ro11, 1);
    TextDrawBackgroundColor(ro11, 51);
    TextDrawFont(ro11, 1);
    TextDrawSetProportional(ro11, 1);

    new str5[100];
    new viptext[20];
    if(IsPlayerVIP(playerid) == 1){format(viptext,20,"~w~Sim");}
    else{format(viptext,20,"~w~Nao");}
    format(str5, sizeof(str5), "%s", viptext);
    ro12 = TextDrawCreate(591.999572, 427.000061, str5);
    TextDrawLetterSize(ro12, 0.449999, 1.600000);
    TextDrawAlignment(ro12, 1);
    TextDrawColor(ro12, -1);
    TextDrawSetShadow(ro12, 0);
    TextDrawSetOutline(ro12, 1);
    TextDrawBackgroundColor(ro12, 51);
    TextDrawFont(ro12, 1);
    TextDrawSetProportional(ro12, 1);
    return 1;
Reply
#2

Como estб essa tua funзгo PlayerName? Ela tб funcionando bem em outras partes do gamemode?
Reply
#3

Quote:
Originally Posted by Diggie
View Post
Como estб essa tua funзгo PlayerName? Ela tб funcionando bem em outras partes do gamemode?
Sim, normalmente.
Reply
#4

PHP Code:
#include <a_samp>

public OnGameModeInit()
{
    
ro1 TextDrawCreate(641.529418423.250000"usebox");
    
TextDrawLetterSize(ro10.0000002.535187);
    
TextDrawTextSize(ro1, -2.0000000.000000);
    
TextDrawAlignment(ro11);
    
TextDrawColor(ro10);
    
TextDrawUseBox(ro1true);
    
TextDrawBoxColor(ro1170);
    
TextDrawSetShadow(ro10);
    
TextDrawSetOutline(ro10);
    
TextDrawFont(ro10);

    
ro2 TextDrawCreate(10.823518428.749969"ID:");
    
TextDrawLetterSize(ro20.4499991.600000);
    
TextDrawAlignment(ro21);
    
TextDrawColor(ro2, -16776961);
    
TextDrawSetShadow(ro20);
    
TextDrawSetOutline(ro20);
    
TextDrawBackgroundColor(ro251);
    
TextDrawFont(ro21);
    
TextDrawSetProportional(ro21);

    
ro3 TextDrawCreate(127.529457428.166564"R$:");
    
TextDrawLetterSize(ro30.4499991.600000);
    
TextDrawAlignment(ro31);
    
TextDrawColor(ro38388863);
    
TextDrawSetShadow(ro30);
    
TextDrawSetOutline(ro31);
    
TextDrawBackgroundColor(ro351);
    
TextDrawFont(ro31);
    
TextDrawSetProportional(ro31);

    
ro4 TextDrawCreate(255.048370428.166595"NICK:");
    
TextDrawLetterSize(ro40.4499991.600000);
    
TextDrawAlignment(ro41);
    
TextDrawColor(ro4, -65281);
    
TextDrawSetShadow(ro40);
    
TextDrawSetOutline(ro41);
    
TextDrawBackgroundColor(ro451);
    
TextDrawFont(ro41);
    
TextDrawSetProportional(ro41);

    
ro5 TextDrawCreate(406.824035428.166748"LEVEL:");
    
TextDrawLetterSize(ro50.4499991.600000);
    
TextDrawAlignment(ro51);
    
TextDrawColor(ro565535);
    
TextDrawSetShadow(ro50);
    
TextDrawSetOutline(ro51);
    
TextDrawBackgroundColor(ro551);
    
TextDrawFont(ro51);
    
TextDrawSetProportional(ro51);

    
ro6 TextDrawCreate(553.411193427.583251"VIP:");
    
TextDrawLetterSize(ro60.4499991.600000);
    
TextDrawAlignment(ro61);
    
TextDrawColor(ro6, -2147450625);
    
TextDrawSetShadow(ro60);
    
TextDrawSetOutline(ro61);
    
TextDrawBackgroundColor(ro651);
    
TextDrawFont(ro61);
    
TextDrawSetProportional(ro61);

    
ro7 TextDrawCreate(503.058441394.917114"www.brasilcidadevirtual.tk");
    
TextDrawLetterSize(ro70.2645881.535833);
    
TextDrawAlignment(ro71);
    
TextDrawColor(ro716777215);
    
TextDrawSetShadow(ro70);
    
TextDrawSetOutline(ro71);
    
TextDrawBackgroundColor(ro751);
    
TextDrawFont(ro73);
    
TextDrawSetProportional(ro71);
    
    
SetTimer("TodosPlayers"1000false);
    return 
1;
}
forward TodosPlayers();
public 
TodosPlayers()
{
    for(new 
iMAX_PLAYERSi++)
    {
        
// Funзгo para atualizar as text draws
        
return 1;
    }
    
SetTimer("TodosPlayers"1000false);

Reply
#5

Manda ela aн pra mim.

Acho que algumas funзхes tuas tгo inъteis ali (GetPlayerGrana) e aparentemente tб bugado porque vocк tem $500 na mгo e ali tб dizendo que vocк tem 0 de dinheiro.

Tem essa funзгo aqui de um gamemode de roleplay:
Code:
ReturnName(playerid, underscore=1)
{
	static
	    name[MAX_PLAYER_NAME + 1];

	GetPlayerName(playerid, name, sizeof(name));

	if (!underscore) {
	    for (new i = 0, len = strlen(name); i < len; i ++) {
	        if (name[i] == '_') name[i] = ' ';
		}

	return name;
}
Aн vocк substitui o PlayerName pra ReturnName(playerid, 0);

Se vocк quiser que apareзa "_" em nomes e outros caracteres, acho que deves utilizar a funзгo nativa GetPlayerName e a funзгo nativa GetPlayerMoney.
Reply
#6

Quote:
Originally Posted by GuiKommander
View Post
PHP Code:
#include <a_samp>
public OnGameModeInit()
{
    
ro1 TextDrawCreate(641.529418423.250000"usebox");
    
TextDrawLetterSize(ro10.0000002.535187);
    
TextDrawTextSize(ro1, -2.0000000.000000);
    
TextDrawAlignment(ro11);
    
TextDrawColor(ro10);
    
TextDrawUseBox(ro1true);
    
TextDrawBoxColor(ro1170);
    
TextDrawSetShadow(ro10);
    
TextDrawSetOutline(ro10);
    
TextDrawFont(ro10);
    
ro2 TextDrawCreate(10.823518428.749969"ID:");
    
TextDrawLetterSize(ro20.4499991.600000);
    
TextDrawAlignment(ro21);
    
TextDrawColor(ro2, -16776961);
    
TextDrawSetShadow(ro20);
    
TextDrawSetOutline(ro20);
    
TextDrawBackgroundColor(ro251);
    
TextDrawFont(ro21);
    
TextDrawSetProportional(ro21);
    
ro3 TextDrawCreate(127.529457428.166564"R$:");
    
TextDrawLetterSize(ro30.4499991.600000);
    
TextDrawAlignment(ro31);
    
TextDrawColor(ro38388863);
    
TextDrawSetShadow(ro30);
    
TextDrawSetOutline(ro31);
    
TextDrawBackgroundColor(ro351);
    
TextDrawFont(ro31);
    
TextDrawSetProportional(ro31);
    
ro4 TextDrawCreate(255.048370428.166595"NICK:");
    
TextDrawLetterSize(ro40.4499991.600000);
    
TextDrawAlignment(ro41);
    
TextDrawColor(ro4, -65281);
    
TextDrawSetShadow(ro40);
    
TextDrawSetOutline(ro41);
    
TextDrawBackgroundColor(ro451);
    
TextDrawFont(ro41);
    
TextDrawSetProportional(ro41);
    
ro5 TextDrawCreate(406.824035428.166748"LEVEL:");
    
TextDrawLetterSize(ro50.4499991.600000);
    
TextDrawAlignment(ro51);
    
TextDrawColor(ro565535);
    
TextDrawSetShadow(ro50);
    
TextDrawSetOutline(ro51);
    
TextDrawBackgroundColor(ro551);
    
TextDrawFont(ro51);
    
TextDrawSetProportional(ro51);
    
ro6 TextDrawCreate(553.411193427.583251"VIP:");
    
TextDrawLetterSize(ro60.4499991.600000);
    
TextDrawAlignment(ro61);
    
TextDrawColor(ro6, -2147450625);
    
TextDrawSetShadow(ro60);
    
TextDrawSetOutline(ro61);
    
TextDrawBackgroundColor(ro651);
    
TextDrawFont(ro61);
    
TextDrawSetProportional(ro61);
    
ro7 TextDrawCreate(503.058441394.917114"www.brasilcidadevirtual.tk");
    
TextDrawLetterSize(ro70.2645881.535833);
    
TextDrawAlignment(ro71);
    
TextDrawColor(ro716777215);
    
TextDrawSetShadow(ro70);
    
TextDrawSetOutline(ro71);
    
TextDrawBackgroundColor(ro751);
    
TextDrawFont(ro73);
    
TextDrawSetProportional(ro71);
    
    
SetTimer("TodosPlayers"1000false);
    return 
1;
}
forward TodosPlayers();
public 
TodosPlayers()
{
    for(new 
iMAX_PLAYERSi++)
    {
        
// Funзгo para atualizar as text draws
        
return 1;
    }
    
SetTimer("TodosPlayers"1000false);

Mas o que vocк mudou? Estб a mesma coisa uй.

pawn Code:
forward preloadtext(playerid);
public preloadtext(playerid)
{
    ro1 = TextDrawCreate(641.529418, 423.250000, "usebox");
    TextDrawLetterSize(ro1, 0.000000, 2.535187);
    TextDrawTextSize(ro1, -2.000000, 0.000000);
    TextDrawAlignment(ro1, 1);
    TextDrawColor(ro1, 0);
    TextDrawUseBox(ro1, true);
    TextDrawBoxColor(ro1, 170);
    TextDrawSetShadow(ro1, 0);
    TextDrawSetOutline(ro1, 0);
    TextDrawFont(ro1, 0);

    ro2 = TextDrawCreate(10.823518, 428.749969, "ID:");
    TextDrawLetterSize(ro2, 0.449999, 1.600000);
    TextDrawAlignment(ro2, 1);
    TextDrawColor(ro2, -16776961);
    TextDrawSetShadow(ro2, 0);
    TextDrawSetOutline(ro2, 0);
    TextDrawBackgroundColor(ro2, 51);
    TextDrawFont(ro2, 1);
    TextDrawSetProportional(ro2, 1);

    ro3 = TextDrawCreate(127.529457, 428.166564, "R$:");
    TextDrawLetterSize(ro3, 0.449999, 1.600000);
    TextDrawAlignment(ro3, 1);
    TextDrawColor(ro3, 8388863);
    TextDrawSetShadow(ro3, 0);
    TextDrawSetOutline(ro3, 1);
    TextDrawBackgroundColor(ro3, 51);
    TextDrawFont(ro3, 1);
    TextDrawSetProportional(ro3, 1);

    ro4 = TextDrawCreate(255.048370, 428.166595, "NICK:");
    TextDrawLetterSize(ro4, 0.449999, 1.600000);
    TextDrawAlignment(ro4, 1);
    TextDrawColor(ro4, -65281);
    TextDrawSetShadow(ro4, 0);
    TextDrawSetOutline(ro4, 1);
    TextDrawBackgroundColor(ro4, 51);
    TextDrawFont(ro4, 1);
    TextDrawSetProportional(ro4, 1);

    ro5 = TextDrawCreate(406.824035, 428.166748, "LEVEL:");
    TextDrawLetterSize(ro5, 0.449999, 1.600000);
    TextDrawAlignment(ro5, 1);
    TextDrawColor(ro5, 65535);
    TextDrawSetShadow(ro5, 0);
    TextDrawSetOutline(ro5, 1);
    TextDrawBackgroundColor(ro5, 51);
    TextDrawFont(ro5, 1);
    TextDrawSetProportional(ro5, 1);

    ro6 = TextDrawCreate(553.411193, 427.583251, "VIP:");
    TextDrawLetterSize(ro6, 0.449999, 1.600000);
    TextDrawAlignment(ro6, 1);
    TextDrawColor(ro6, -2147450625);
    TextDrawSetShadow(ro6, 0);
    TextDrawSetOutline(ro6, 1);
    TextDrawBackgroundColor(ro6, 51);
    TextDrawFont(ro6, 1);
    TextDrawSetProportional(ro6, 1);

    ro7 = TextDrawCreate(503.058441, 394.917114, "www.brasilcidadevirtual.tk");
    TextDrawLetterSize(ro7, 0.264588, 1.535833);
    TextDrawAlignment(ro7, 1);
    TextDrawColor(ro7, 16777215);
    TextDrawSetShadow(ro7, 0);
    TextDrawSetOutline(ro7, 1);
    TextDrawBackgroundColor(ro7, 51);
    TextDrawFont(ro7, 3);
    TextDrawSetProportional(ro7, 1);

    new str1[100];
    format(str1, sizeof(str1), "%d", playerid);
    ro8 = TextDrawCreate(39.999992, 428.166687, str1);
    TextDrawLetterSize(ro8, 0.449999, 1.600000);
    TextDrawAlignment(ro8, 1);
    TextDrawColor(ro8, -1);
    TextDrawSetShadow(ro8, 0);
    TextDrawSetOutline(ro8, 1);
    TextDrawBackgroundColor(ro8, 51);
    TextDrawFont(ro8, 1);
    TextDrawSetProportional(ro8, 1);

    new str2[500];
    format(str2, sizeof(str2), "%d", GetPlayerGrana(playerid));
    ro9 = TextDrawCreate(160.941192, 427.583251, str2);
    TextDrawLetterSize(ro9, 0.449999, 1.600000);
    TextDrawAlignment(ro9, 1);
    TextDrawColor(ro9, -1);
    TextDrawSetShadow(ro9, 0);
    TextDrawSetOutline(ro9, 1);
    TextDrawBackgroundColor(ro9, 51);
    TextDrawFont(ro9, 1);
    TextDrawSetProportional(ro9, 1);

    new str3[500];
    format(str3, sizeof(str3), "%s", PlayerName(playerid));
    ro10 = TextDrawCreate(306.823608, 427.583374, str3);
    TextDrawLetterSize(ro10, 0.449999, 1.600000);
    TextDrawAlignment(ro10, 1);
    TextDrawColor(ro10, -1);
    TextDrawSetShadow(ro10, 0);
    TextDrawSetOutline(ro10, 1);
    TextDrawBackgroundColor(ro10, 51);
    TextDrawFont(ro10, 1);
    TextDrawSetProportional(ro10, 1);

    new str4[500];
    format(str4, sizeof(str4), "%d", dini_Int(file, "Level"));
    ro11 = TextDrawCreate(461.647186, 427.583312, str4);
    TextDrawLetterSize(ro11, 0.449999, 1.600000);
    TextDrawAlignment(ro11, 1);
    TextDrawColor(ro11, -1);
    TextDrawSetShadow(ro11, 0);
    TextDrawSetOutline(ro11, 1);
    TextDrawBackgroundColor(ro11, 51);
    TextDrawFont(ro11, 1);
    TextDrawSetProportional(ro11, 1);

    new str5[100];
    new viptext[20];
    if(IsPlayerVIP(playerid) == 1){format(viptext,20,"~w~Sim");}
    else{format(viptext,20,"~w~Nao");}
    format(str5, sizeof(str5), "%s", viptext);
    ro12 = TextDrawCreate(591.999572, 427.000061, str5);
    TextDrawLetterSize(ro12, 0.449999, 1.600000);
    TextDrawAlignment(ro12, 1);
    TextDrawColor(ro12, -1);
    TextDrawSetShadow(ro12, 0);
    TextDrawSetOutline(ro12, 1);
    TextDrawBackgroundColor(ro12, 51);
    TextDrawFont(ro12, 1);
    TextDrawSetProportional(ro12, 1);
    return 1;
}
Reply
#7

Manda todas as textdraws, sem estar junto com essa forward.

Aн manda o cуdigo que vc tб usando dentro da forward.
Reply
#8

Quote:
Originally Posted by GuiKommander
View Post
Manda todas as textdraws, sem estar junto com essa forward.

Aн manda o cуdigo que vc tб usando dentro da forward.
Mas й isso aн, essas sгo as textdraws.
Reply
#9

UPPP
Reply
#10

Fiz na pressa, nem testei, nгo sei se tem erros. Se tiver me desculpe, e avise-me.

PHP Code:
#include <a_samp>

public OnGameModeInit()
{
    
ro1 TextDrawCreate(641.529418423.250000"usebox");
    
TextDrawLetterSize(ro10.0000002.535187);
    
TextDrawTextSize(ro1, -2.0000000.000000);
    
TextDrawAlignment(ro11);
    
TextDrawColor(ro10);
    
TextDrawUseBox(ro1true);
    
TextDrawBoxColor(ro1170);
    
TextDrawSetShadow(ro10);
    
TextDrawSetOutline(ro10);
    
TextDrawFont(ro10);

    
ro2 TextDrawCreate(10.823518428.749969"ID:");
    
TextDrawLetterSize(ro20.4499991.600000);
    
TextDrawAlignment(ro21);
    
TextDrawColor(ro2, -16776961);
    
TextDrawSetShadow(ro20);
    
TextDrawSetOutline(ro20);
    
TextDrawBackgroundColor(ro251);
    
TextDrawFont(ro21);
    
TextDrawSetProportional(ro21);

    
ro3 TextDrawCreate(127.529457428.166564"R$:");
    
TextDrawLetterSize(ro30.4499991.600000);
    
TextDrawAlignment(ro31);
    
TextDrawColor(ro38388863);
    
TextDrawSetShadow(ro30);
    
TextDrawSetOutline(ro31);
    
TextDrawBackgroundColor(ro351);
    
TextDrawFont(ro31);
    
TextDrawSetProportional(ro31);

    
ro4 TextDrawCreate(255.048370428.166595"NICK:");
    
TextDrawLetterSize(ro40.4499991.600000);
    
TextDrawAlignment(ro41);
    
TextDrawColor(ro4, -65281);
    
TextDrawSetShadow(ro40);
    
TextDrawSetOutline(ro41);
    
TextDrawBackgroundColor(ro451);
    
TextDrawFont(ro41);
    
TextDrawSetProportional(ro41);

    
ro5 TextDrawCreate(406.824035428.166748"LEVEL:");
    
TextDrawLetterSize(ro50.4499991.600000);
    
TextDrawAlignment(ro51);
    
TextDrawColor(ro565535);
    
TextDrawSetShadow(ro50);
    
TextDrawSetOutline(ro51);
    
TextDrawBackgroundColor(ro551);
    
TextDrawFont(ro51);
    
TextDrawSetProportional(ro51);

    
ro6 TextDrawCreate(553.411193427.583251"VIP:");
    
TextDrawLetterSize(ro60.4499991.600000);
    
TextDrawAlignment(ro61);
    
TextDrawColor(ro6, -2147450625);
    
TextDrawSetShadow(ro60);
    
TextDrawSetOutline(ro61);
    
TextDrawBackgroundColor(ro651);
    
TextDrawFont(ro61);
    
TextDrawSetProportional(ro61);

    
ro7 TextDrawCreate(503.058441394.917114"www.brasilcidadevirtual.tk");
    
TextDrawLetterSize(ro70.2645881.535833);
    
TextDrawAlignment(ro71);
    
TextDrawColor(ro716777215);
    
TextDrawSetShadow(ro70);
    
TextDrawSetOutline(ro71);
    
TextDrawBackgroundColor(ro751);
    
TextDrawFont(ro73);
    
TextDrawSetProportional(ro71);
    
    
SetTimer("TodosPlayers"1000false);
    return 
1;
}
forward TodosPlayers();
public 
TodosPlayers()
{
    for(new 
iMAX_PLAYERSi++)
    {
        new 
str1[10];
        
format(str1sizeof(str1), "%d"i);
        
TextDrawSetString(ro8str1);

        new 
str2[100];
        
format(str2sizeof(str2), "%d"GetPlayerGrana(i)); // Se nгo der certo, olha essas funзхes, tipo essa GetPlayerGrana
        
TextDrawSetString(ro9str2);

        new 
str3[100];
        
format(str3sizeof(str3), "%s"PlayerName(i));
        
TextDrawSetString(ro10str3);

        new 
str4[100];
        
format(str4sizeof(str4), "%d"dini_Int(file"Level"));
        
TextDrawSetString(rol11str4);

        new 
str5[100];
        new 
viptext[20];
        if(
IsPlayerVIP(i) == 1){format(viptext,20,"~w~Sim");}
        else{
format(viptext,20,"~w~Nao");}
        
format(str5sizeof(str5), "%s"viptext);
        
TextDrawSetString(ro12str5);

        return 
1;
    }
    
SetTimer("TodosPlayers"1000false);

Reply
#11

Sim, essas sгo as textdraws, mas manda as stocks/forwards/funзхes que foram chamadas ali. Porque ao que tudo indica elas estгo retornando um valor 0.

O erro aparenta ser na funзгo propriamente dita. Seria legal que tu mandasse o cуdigo completo dessa PlayerName(playerid) e o cуdigo da GetPlayerGrana(playerid), porque o bug aparenta ser na funзгo.

Mas faz o seguinte nas textdraws:
PHP Code:
ro1 TextDrawCreate(641.529418423.250000"usebox");
    
TextDrawLetterSize(ro10.0000002.535187);
    
TextDrawTextSize(ro1, -2.0000000.000000);
    
TextDrawAlignment(ro11);
    
TextDrawColor(ro10);
    
TextDrawUseBox(ro1true);
    
TextDrawBoxColor(ro1170);
    
TextDrawSetShadow(ro10);
    
TextDrawSetOutline(ro10);
    
TextDrawFont(ro10);
    
ro2 TextDrawCreate(10.823518428.749969"ID:");
    
TextDrawLetterSize(ro20.4499991.600000);
    
TextDrawAlignment(ro21);
    
TextDrawColor(ro2, -16776961);
    
TextDrawSetShadow(ro20);
    
TextDrawSetOutline(ro20);
    
TextDrawBackgroundColor(ro251);
    
TextDrawFont(ro21);
    
TextDrawSetProportional(ro21);
    
ro3 TextDrawCreate(127.529457428.166564"R$:");
    
TextDrawLetterSize(ro30.4499991.600000);
    
TextDrawAlignment(ro31);
    
TextDrawColor(ro38388863);
    
TextDrawSetShadow(ro30);
    
TextDrawSetOutline(ro31);
    
TextDrawBackgroundColor(ro351);
    
TextDrawFont(ro31);
    
TextDrawSetProportional(ro31);
    
ro4 TextDrawCreate(255.048370428.166595"NICK:");
    
TextDrawLetterSize(ro40.4499991.600000);
    
TextDrawAlignment(ro41);
    
TextDrawColor(ro4, -65281);
    
TextDrawSetShadow(ro40);
    
TextDrawSetOutline(ro41);
    
TextDrawBackgroundColor(ro451);
    
TextDrawFont(ro41);
    
TextDrawSetProportional(ro41);
    
ro5 TextDrawCreate(406.824035428.166748"LEVEL:");
    
TextDrawLetterSize(ro50.4499991.600000);
    
TextDrawAlignment(ro51);
    
TextDrawColor(ro565535);
    
TextDrawSetShadow(ro50);
    
TextDrawSetOutline(ro51);
    
TextDrawBackgroundColor(ro551);
    
TextDrawFont(ro51);
    
TextDrawSetProportional(ro51);
    
ro6 TextDrawCreate(553.411193427.583251"VIP:");
    
TextDrawLetterSize(ro60.4499991.600000);
    
TextDrawAlignment(ro61);
    
TextDrawColor(ro6, -2147450625);
    
TextDrawSetShadow(ro60);
    
TextDrawSetOutline(ro61);
    
TextDrawBackgroundColor(ro651);
    
TextDrawFont(ro61);
    
TextDrawSetProportional(ro61);
    
ro7 TextDrawCreate(503.058441394.917114"www.brasilcidadevirtual.tk");
    
TextDrawLetterSize(ro70.2645881.535833);
    
TextDrawAlignment(ro71);
    
TextDrawColor(ro716777215);
    
TextDrawSetShadow(ro70);
    
TextDrawSetOutline(ro71);
    
TextDrawBackgroundColor(ro751);
    
TextDrawFont(ro73);
    
TextDrawSetProportional(ro71);
    new 
str1[100];
    
format(str1sizeof(str1), "~w~%d"playerid);
    
ro8 TextDrawCreate(39.999992428.166687str1);
    
TextDrawLetterSize(ro80.4499991.600000);
    
TextDrawAlignment(ro81);
    
TextDrawColor(ro8, -1);
    
TextDrawSetShadow(ro80);
    
TextDrawSetOutline(ro81);
    
TextDrawBackgroundColor(ro851);
    
TextDrawFont(ro81);
    
TextDrawSetProportional(ro81);
    new 
str2[500];
    
format(str2sizeof(str2), "~w~%d"GetPlayerGrana(playerid));
    
ro9 TextDrawCreate(160.941192427.583251str2);
    
TextDrawLetterSize(ro90.4499991.600000);
    
TextDrawAlignment(ro91);
    
TextDrawColor(ro9, -1);
    
TextDrawSetShadow(ro90);
    
TextDrawSetOutline(ro91);
    
TextDrawBackgroundColor(ro951);
    
TextDrawFont(ro91);
    
TextDrawSetProportional(ro91);
    new 
str3[500];
    
format(str3sizeof(str3), "~w~%s"PlayerName(playerid));
    
ro10 TextDrawCreate(306.823608427.583374str3);
    
TextDrawLetterSize(ro100.4499991.600000);
    
TextDrawAlignment(ro101);
    
TextDrawColor(ro10, -1);
    
TextDrawSetShadow(ro100);
    
TextDrawSetOutline(ro101);
    
TextDrawBackgroundColor(ro1051);
    
TextDrawFont(ro101);
    
TextDrawSetProportional(ro101);
    new 
str4[500];
    
format(str4sizeof(str4), "~w~%d"dini_Int(file"Level"));
    
ro11 TextDrawCreate(461.647186427.583312str4);
    
TextDrawLetterSize(ro110.4499991.600000);
    
TextDrawAlignment(ro111);
    
TextDrawColor(ro11, -1);
    
TextDrawSetShadow(ro110);
    
TextDrawSetOutline(ro111);
    
TextDrawBackgroundColor(ro1151);
    
TextDrawFont(ro111);
    
TextDrawSetProportional(ro111);
    new 
str5[100];
    new 
viptext[20];
    if(
IsPlayerVIP(playerid) == 1){format(viptext,20,"~w~Sim");}
    else{
format(viptext,20,"~w~Nao");}
    
format(str5sizeof(str5), "%s"viptext);
    
ro12 TextDrawCreate(591.999572427.000061str5);
    
TextDrawLetterSize(ro120.4499991.600000);
    
TextDrawAlignment(ro121);
    
TextDrawColor(ro12, -1);
    
TextDrawSetShadow(ro120);
    
TextDrawSetOutline(ro121);
    
TextDrawBackgroundColor(ro1251);
    
TextDrawFont(ro121);
    
TextDrawSetProportional(ro121);
    return 
1;

Reply
#12

Quote:
Originally Posted by Diggie
View Post
Sim, essas sгo as textdraws, mas manda as stocks/forwards/funзхes que foram chamadas ali. Porque ao que tudo indica elas estгo retornando um valor 0.

O erro aparenta ser na funзгo propriamente dita. Seria legal que tu mandasse o cуdigo completo dessa PlayerName(playerid) e o cуdigo da GetPlayerGrana(playerid), porque o bug aparenta ser na funзгo.

Mas faz o seguinte nas textdraws:
PHP Code:
ro1 TextDrawCreate(641.529418423.250000"usebox");
    
TextDrawLetterSize(ro10.0000002.535187);
    
TextDrawTextSize(ro1, -2.0000000.000000);
    
TextDrawAlignment(ro11);
    
TextDrawColor(ro10);
    
TextDrawUseBox(ro1true);
    
TextDrawBoxColor(ro1170);
    
TextDrawSetShadow(ro10);
    
TextDrawSetOutline(ro10);
    
TextDrawFont(ro10);
    
ro2 TextDrawCreate(10.823518428.749969"ID:");
    
TextDrawLetterSize(ro20.4499991.600000);
    
TextDrawAlignment(ro21);
    
TextDrawColor(ro2, -16776961);
    
TextDrawSetShadow(ro20);
    
TextDrawSetOutline(ro20);
    
TextDrawBackgroundColor(ro251);
    
TextDrawFont(ro21);
    
TextDrawSetProportional(ro21);
    
ro3 TextDrawCreate(127.529457428.166564"R$:");
    
TextDrawLetterSize(ro30.4499991.600000);
    
TextDrawAlignment(ro31);
    
TextDrawColor(ro38388863);
    
TextDrawSetShadow(ro30);
    
TextDrawSetOutline(ro31);
    
TextDrawBackgroundColor(ro351);
    
TextDrawFont(ro31);
    
TextDrawSetProportional(ro31);
    
ro4 TextDrawCreate(255.048370428.166595"NICK:");
    
TextDrawLetterSize(ro40.4499991.600000);
    
TextDrawAlignment(ro41);
    
TextDrawColor(ro4, -65281);
    
TextDrawSetShadow(ro40);
    
TextDrawSetOutline(ro41);
    
TextDrawBackgroundColor(ro451);
    
TextDrawFont(ro41);
    
TextDrawSetProportional(ro41);
    
ro5 TextDrawCreate(406.824035428.166748"LEVEL:");
    
TextDrawLetterSize(ro50.4499991.600000);
    
TextDrawAlignment(ro51);
    
TextDrawColor(ro565535);
    
TextDrawSetShadow(ro50);
    
TextDrawSetOutline(ro51);
    
TextDrawBackgroundColor(ro551);
    
TextDrawFont(ro51);
    
TextDrawSetProportional(ro51);
    
ro6 TextDrawCreate(553.411193427.583251"VIP:");
    
TextDrawLetterSize(ro60.4499991.600000);
    
TextDrawAlignment(ro61);
    
TextDrawColor(ro6, -2147450625);
    
TextDrawSetShadow(ro60);
    
TextDrawSetOutline(ro61);
    
TextDrawBackgroundColor(ro651);
    
TextDrawFont(ro61);
    
TextDrawSetProportional(ro61);
    
ro7 TextDrawCreate(503.058441394.917114"www.brasilcidadevirtual.tk");
    
TextDrawLetterSize(ro70.2645881.535833);
    
TextDrawAlignment(ro71);
    
TextDrawColor(ro716777215);
    
TextDrawSetShadow(ro70);
    
TextDrawSetOutline(ro71);
    
TextDrawBackgroundColor(ro751);
    
TextDrawFont(ro73);
    
TextDrawSetProportional(ro71);
    new 
str1[100];
    
format(str1sizeof(str1), "~w~%d"playerid);
    
ro8 TextDrawCreate(39.999992428.166687str1);
    
TextDrawLetterSize(ro80.4499991.600000);
    
TextDrawAlignment(ro81);
    
TextDrawColor(ro8, -1);
    
TextDrawSetShadow(ro80);
    
TextDrawSetOutline(ro81);
    
TextDrawBackgroundColor(ro851);
    
TextDrawFont(ro81);
    
TextDrawSetProportional(ro81);
    new 
str2[500];
    
format(str2sizeof(str2), "~w~%d"GetPlayerGrana(playerid));
    
ro9 TextDrawCreate(160.941192427.583251str2);
    
TextDrawLetterSize(ro90.4499991.600000);
    
TextDrawAlignment(ro91);
    
TextDrawColor(ro9, -1);
    
TextDrawSetShadow(ro90);
    
TextDrawSetOutline(ro91);
    
TextDrawBackgroundColor(ro951);
    
TextDrawFont(ro91);
    
TextDrawSetProportional(ro91);
    new 
str3[500];
    
format(str3sizeof(str3), "~w~%s"PlayerName(playerid));
    
ro10 TextDrawCreate(306.823608427.583374str3);
    
TextDrawLetterSize(ro100.4499991.600000);
    
TextDrawAlignment(ro101);
    
TextDrawColor(ro10, -1);
    
TextDrawSetShadow(ro100);
    
TextDrawSetOutline(ro101);
    
TextDrawBackgroundColor(ro1051);
    
TextDrawFont(ro101);
    
TextDrawSetProportional(ro101);
    new 
str4[500];
    
format(str4sizeof(str4), "~w~%d"dini_Int(file"Level"));
    
ro11 TextDrawCreate(461.647186427.583312str4);
    
TextDrawLetterSize(ro110.4499991.600000);
    
TextDrawAlignment(ro111);
    
TextDrawColor(ro11, -1);
    
TextDrawSetShadow(ro110);
    
TextDrawSetOutline(ro111);
    
TextDrawBackgroundColor(ro1151);
    
TextDrawFont(ro111);
    
TextDrawSetProportional(ro111);
    new 
str5[100];
    new 
viptext[20];
    if(
IsPlayerVIP(playerid) == 1){format(viptext,20,"~w~Sim");}
    else{
format(viptext,20,"~w~Nao");}
    
format(str5sizeof(str5), "%s"viptext);
    
ro12 TextDrawCreate(591.999572427.000061str5);
    
TextDrawLetterSize(ro120.4499991.600000);
    
TextDrawAlignment(ro121);
    
TextDrawColor(ro12, -1);
    
TextDrawSetShadow(ro120);
    
TextDrawSetOutline(ro121);
    
TextDrawBackgroundColor(ro1251);
    
TextDrawFont(ro121);
    
TextDrawSetProportional(ro121);
    return 
1;

Ficou da mesma forma que estava antes mano, tudo 0 e o nick nгo aparece nada...
Reply
#13

mande quando vocк atualiza essas textdraw.

Outra vocк deve usar PlayerTextDraw й nгo TextDraw vai dar alguns bugs quando outro player entrar. Se nгo der mesmo assim use PlayerTextDraw й o certo a se fazer.

TextDraw - Para todos.
PlayerTextDraw - Para cada player.

Rodapй serб para cada player logicamente
Reply
#14

Estou com um tempo livre, ai acabei fazendo para vocк:

https://pastebin.com/Sjcxv5Rc

Testa ai!
Reply
#15

UPPP.
Reply
#16

Vocк tem que criar como PlayerTextdraw.
Se usar como global, vai causar conflito quando houver outro jogador (as informaзхes irгo ser trocadas).
Depois, em OnPlayerSpawn ou outra callback de sua preferкncia vocк precisa formatar a string. Use %s para letras e nъmeros e use %d apenas para nъmeros.
Reply
#17

Quote:
Originally Posted by ipsLuan
View Post
Vocк tem que criar como PlayerTextdraw.
Se usar como global, vai causar conflito quando houver outro jogador (as informaзхes irгo ser trocadas).
Depois, em OnPlayerSpawn ou outra callback de sua preferкncia vocк precisa formatar a string. Use %s para letras e nъmeros e use %d apenas para nъmeros.
Sou meio que iniciante no pawno, nгo dou conta de fazer isso...
Reply
#18

Ele ta falando do cуdigo do wearLy crie suas textdraws pelo Ipleomax Editor coloque para cada player.

Se nгo quiser criar tudo de novo suas TD sу converter para PlayerTextDraw. Depois eu lhe mostro como faz isso.

To ocupado agora

@Edit

To sem fazer nada msm vo fazer aqui
Reply
#19

Quote:
Originally Posted by LeonardoMD
View Post
Sou meio que iniciante no pawno, nгo dou conta de fazer isso...
Tente usar o cуdigo fornecido pelo carinha ali em cima.
Reply
#20

PHP Code:
//  Topo do GM
new PlayerText:Rodape[MAX_PLAYERS][7];
forward RodapeTD(playerid);
//  Public OnPlayerConnect
public OnPlayerConnect(playerid)
{
    
LoadTextDraws(playerid);
    return 
1;
}
//  Final do GM
LoadTextDraws(playerid)
{
    
SetTimerEx("RodapeTD"500true"d"playerid);
    
Rodape[playerid][0] = CreatePlayerTextDraw(playerid641.529418423.250000"_");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][0], 255);
    
PlayerTextDrawFont(playeridRodape[playerid][0], 0);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][0], 0.0000002.535187);
    
PlayerTextDrawColor(playeridRodape[playerid][0], 0);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][0], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][0], 1);
    
PlayerTextDrawSetShadow(playeridRodape[playerid][0], 1);
    
PlayerTextDrawUseBox(playeridRodape[playerid][0], 1);
    
PlayerTextDrawBoxColor(playeridRodape[playerid][0], 170);
    
PlayerTextDrawTextSize(playeridRodape[playerid][0], -2.0000000.000000);
    
Rodape[playerid][1] = CreatePlayerTextDraw(playerid10.823518428.749969"ID:");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][1], 51);
    
PlayerTextDrawAlignment(playeridRodape[playerid][1], 1);
    
PlayerTextDrawFont(playeridRodape[playerid][1], 1);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][1], 0.4499991.600000);
    
PlayerTextDrawColor(playeridRodape[playerid][1], -16776961);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][1], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][1], 1);
    
Rodape[playerid][2] = CreatePlayerTextDraw(playerid127.529457428.166564"R$:");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][2], 51);
    
PlayerTextDrawAlignment(playeridRodape[playerid][2], 1);
    
PlayerTextDrawFont(playeridRodape[playerid][2], 1);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][2], 0.4499991.600000);
    
PlayerTextDrawColor(playeridRodape[playerid][2], 8388863);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][2], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][2], 1);
    
Rodape[playerid][3] = CreatePlayerTextDraw(playerid255.048370428.166595"NICK:");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][3], 51);
    
PlayerTextDrawAlignment(playeridRodape[playerid][3], 1);
    
PlayerTextDrawFont(playeridRodape[playerid][3], 1);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][3], 0.4499991.600000);
    
PlayerTextDrawColor(playeridRodape[playerid][3], -65281);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][3], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][3], 1);
    
Rodape[playerid][4] = CreatePlayerTextDraw(playerid406.824035428.166748"LEVEL:");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][4], 51);
    
PlayerTextDrawAlignment(playeridRodape[playerid][4], 1);
    
PlayerTextDrawFont(playeridRodape[playerid][4], 1);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][4], 0.4499991.600000);
    
PlayerTextDrawColor(playeridRodape[playerid][4], 65535);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][4], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][4], 1);
    
Rodape[playerid][5] = CreatePlayerTextDraw(playerid553.411193427.583251"VIP:");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][5], 51);
    
PlayerTextDrawAlignment(playeridRodape[playerid][5], 1);
    
PlayerTextDrawFont(playeridRodape[playerid][5], 1);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][5], 0.4499991.600000);
    
PlayerTextDrawColor(playeridRodape[playerid][5], -2147450625);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][5], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][5], 1);
    
Rodape[playerid][6] = CreatePlayerTextDraw(playerid503.058441394.917114"www.brasilcidadevirtual.tk");
    
PlayerTextDrawBackgroundColor(playeridRodape[playerid][6], 51);
    
PlayerTextDrawAlignment(playeridRodape[playerid][6], 1);
    
PlayerTextDrawFont(playeridRodape[playerid][6], 1);
    
PlayerTextDrawLetterSize(playeridRodape[playerid][6], 0.2645881.535833);
    
PlayerTextDrawColor(playeridRodape[playerid][6], 16777215);
    
PlayerTextDrawSetOutline(playeridRodape[playerid][6], 0);
    
PlayerTextDrawSetProportional(playeridRodape[playerid][6], 1);
    return 
1;
}
public 
RodapeTD(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
String[45];
        
PlayerTextDrawSetString(playeridRodape[playerid][0], "_");
        
PlayerTextDrawShow(playeridRodape[playerid][0]);
        
format(Stringsizeof(String), "ID: ~w~%d"playerid);
        
PlayerTextDrawSetString(playeridRodape[playerid][1], String);
        
PlayerTextDrawShow(playeridRodape[playerid][1]);
        
format(Stringsizeof(String), "R$: ~w~%d"GetPlayerGrana(playerid));
        
PlayerTextDrawSetString(playeridRodape[playerid][2], String);
        
PlayerTextDrawShow(playeridRodape[playerid][2]);
        
format(Stringsizeof(String), "NICK: ~w~%s"PlayerName(playerid));
        
PlayerTextDrawSetString(playeridRodape[playerid][3], String);
        
PlayerTextDrawShow(playeridRodape[playerid][3]);
        
format(Stringsizeof(String), "LEVEL: ~w~%d"dini_Int(file"Level"));
        
PlayerTextDrawSetString(playeridRodape[playerid][4], String);
        
PlayerTextDrawShow(playeridRodape[playerid][4]);
        if(
IsPlayerVIP(playerid) == 1)
        {
            
format(Stringsizeof(String), "VIP: ~w~Sim");
            
PlayerTextDrawSetString(playeridRodape[playerid][5], String);
            
PlayerTextDrawShow(playeridRodape[playerid][5]);
        }
        else
        {
            
format(Stringsizeof(String), "VIP: ~w~Nao");
            
PlayerTextDrawSetString(playeridRodape[playerid][5], String);
            
PlayerTextDrawShow(playeridRodape[playerid][5]);
        }
        
        
PlayerTextDrawSetString(playeridRodape[playerid][6], "www.brasilcidadevirtual.tk");
        
PlayerTextDrawShow(playeridRodape[playerid][6]);
    }
    return 
1;

Nгo testei se tiver erros vocк consegue arrumar, Й bem simples de fazer TD's

@CUIDADO

Suas strings contйm muitas cйlulas! Vocк nгo vai utilizar 500 cйlulas para pegar o level do player no mбximo: 35 б 45 caracteres
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)