[Ajuda] TextDraw de status bugado
#1

Boas Galera queria saber assim
No meu Servidor estou tentando por os status do player na parte inferior da tela
Ate ai tranquilho
Sу que quando outro player loga aparece o status do outro player
Estou tentando mais nus estou boiando aqui se alguйm puder ajudar ficarei muito grato

Meu GameMode esta sendo feito por mim do zero ( entгo nгo repare na minha 1 textdraw )

No Topo do meu GM ta assim
Код:
//Status Player
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6;
new Text:Textdraw7;
new Text:Textdraw8;
new Text:Textdraw9;
new Text:Textdraw10;
new Text:Textdraw11;
new Text:Textdraw12;
new Text:Textdraw13;
new Text:Textdraw14;
new Text:Textdraw15;
new Text:Textdraw16;
//Fim Status Player
No OnGameModeInit
Код:
	// Status Player
	Textdraw0 = TextDrawCreate(642.000000, 425.000000, "_");// Fundo preto
	TextDrawBackgroundColor(Textdraw0, 255);
	TextDrawFont(Textdraw0, 1);
	TextDrawLetterSize(Textdraw0, 0.480000, 2.300000);
	TextDrawColor(Textdraw0, -1);
	TextDrawSetOutline(Textdraw0, 0);
	TextDrawSetProportional(Textdraw0, 1);
	TextDrawSetShadow(Textdraw0, 5);
	TextDrawUseBox(Textdraw0, 1);
	TextDrawBoxColor(Textdraw0, 102);
	TextDrawTextSize(Textdraw0, -3.000000, 0.000000);

	Textdraw1 = TextDrawCreate(8.000000, 424.000000, "Level:");
	TextDrawBackgroundColor(Textdraw1, 255);
	TextDrawFont(Textdraw1, 1);
	TextDrawLetterSize(Textdraw1, 0.240000, 1.100000);
	TextDrawColor(Textdraw1, -65281);
	TextDrawSetOutline(Textdraw1, 0);
	TextDrawSetProportional(Textdraw1, 1);
	TextDrawSetShadow(Textdraw1, 1);

	Textdraw2 = TextDrawCreate(72.000000, 424.000000, "Kills:");
	TextDrawBackgroundColor(Textdraw2, 255);
	TextDrawFont(Textdraw2, 1);
	TextDrawLetterSize(Textdraw2, 0.240000, 1.100000);
	TextDrawColor(Textdraw2, -65281);
	TextDrawSetOutline(Textdraw2, 0);
	TextDrawSetProportional(Textdraw2, 1);
	TextDrawSetShadow(Textdraw2, 1);

	Textdraw3 = TextDrawCreate(60.000000, 435.000000, "Mortes:");
	TextDrawBackgroundColor(Textdraw3, 255);
	TextDrawFont(Textdraw3, 1);
	TextDrawLetterSize(Textdraw3, 0.240000, 1.100000);
	TextDrawColor(Textdraw3, -65281);
	TextDrawSetOutline(Textdraw3, 0);
	TextDrawSetProportional(Textdraw3, 1);
	TextDrawSetShadow(Textdraw3, 1);

	Textdraw4 = TextDrawCreate(128.000000, 424.000000, "Fome:");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.240000, 1.100000);
	TextDrawColor(Textdraw4, -65281);
	TextDrawSetOutline(Textdraw4, 0);
	TextDrawSetProportional(Textdraw4, 1);
	TextDrawSetShadow(Textdraw4, 1);

	Textdraw5 = TextDrawCreate(130.000000, 435.000000, "Sede:");
	TextDrawBackgroundColor(Textdraw5, 255);
	TextDrawFont(Textdraw5, 1);
	TextDrawLetterSize(Textdraw5, 0.240000, 1.100000);
	TextDrawColor(Textdraw5, -65281);
	TextDrawSetOutline(Textdraw5, 0);
	TextDrawSetProportional(Textdraw5, 1);
	TextDrawSetShadow(Textdraw5, 1);

	Textdraw6 = TextDrawCreate(228.000000, 429.000000, "_");// ainda falta o sistema 
	TextDrawBackgroundColor(Textdraw6, 255);
	TextDrawFont(Textdraw6, 1);
	TextDrawLetterSize(Textdraw6, 0.000000, 0.199999);
	TextDrawColor(Textdraw6, -1);
	TextDrawSetOutline(Textdraw6, 0);
	TextDrawSetProportional(Textdraw6, 1);
	TextDrawSetShadow(Textdraw6, 1);
	TextDrawUseBox(Textdraw6, 1);
	TextDrawBoxColor(Textdraw6, -16776961);
	TextDrawTextSize(Textdraw6, 152.000000, 0.000000);

	Textdraw7 = TextDrawCreate(228.000000, 440.000000, "_");// ainda falta o sistema 
	TextDrawBackgroundColor(Textdraw7, 255);
	TextDrawFont(Textdraw7, 1);
	TextDrawLetterSize(Textdraw7, 0.000000, 0.199999);
	TextDrawColor(Textdraw7, -1);
	TextDrawSetOutline(Textdraw7, 0);
	TextDrawSetProportional(Textdraw7, 1);
	TextDrawSetShadow(Textdraw7, 1);
	TextDrawUseBox(Textdraw7, 1);
	TextDrawBoxColor(Textdraw7, -16776961);
	TextDrawTextSize(Textdraw7, 152.000000, 0.000000);

	Textdraw8 = TextDrawCreate(250.000000, 435.000000, "Lataria:");
	TextDrawBackgroundColor(Textdraw8, 255);
	TextDrawFont(Textdraw8, 1);
	TextDrawLetterSize(Textdraw8, 0.240000, 1.100000);
	TextDrawColor(Textdraw8, -65281);
	TextDrawSetOutline(Textdraw8, 0);
	TextDrawSetProportional(Textdraw8, 1);
	TextDrawSetShadow(Textdraw8, 1);

	Textdraw9 = TextDrawCreate(3.000000, 435.000000, "Online:");
	TextDrawBackgroundColor(Textdraw9, 255);
	TextDrawFont(Textdraw9, 1);
	TextDrawLetterSize(Textdraw9, 0.240000, 1.100000);
	TextDrawColor(Textdraw9, -65281);
	TextDrawSetOutline(Textdraw9, 0);
	TextDrawSetProportional(Textdraw9, 1);
	TextDrawSetShadow(Textdraw9, 1);

	Textdraw10 = TextDrawCreate(230.000000, 424.000000, "Combustivel:");
	TextDrawBackgroundColor(Textdraw10, 255);
	TextDrawFont(Textdraw10, 1);
	TextDrawLetterSize(Textdraw10, 0.240000, 1.100000);
	TextDrawColor(Textdraw10, -65281);
	TextDrawSetOutline(Textdraw10, 0);
	TextDrawSetProportional(Textdraw10, 1);
	TextDrawSetShadow(Textdraw10, 1);

	Textdraw11 = TextDrawCreate(32.000000, 424.000000, "_"); // Level
	TextDrawBackgroundColor(Textdraw11, 255);
	TextDrawFont(Textdraw11, 2);
	TextDrawLetterSize(Textdraw11, 0.180000, 1.100000);
	TextDrawColor(Textdraw11, -1);
	TextDrawSetOutline(Textdraw11, 0);
	TextDrawSetProportional(Textdraw11, 1);
	TextDrawSetShadow(Textdraw11, 1);

	Textdraw12 = TextDrawCreate(92.000000, 424.000000, "_"); // Matou
	TextDrawBackgroundColor(Textdraw12, 255);
	TextDrawFont(Textdraw12, 2);
	TextDrawLetterSize(Textdraw12, 0.180000, 1.100000);
	TextDrawColor(Textdraw12, -1);
	TextDrawSetOutline(Textdraw12, 0);
	TextDrawSetProportional(Textdraw12, 1);
	TextDrawSetShadow(Textdraw12, 1);

	Textdraw13 = TextDrawCreate(92.000000, 435.000000, "_"); //Morreu
	TextDrawBackgroundColor(Textdraw13, 255);
	TextDrawFont(Textdraw13, 2);
	TextDrawLetterSize(Textdraw13, 0.180000, 1.100000);
	TextDrawColor(Textdraw13, -1);
	TextDrawSetOutline(Textdraw13, 0);
	TextDrawSetProportional(Textdraw13, 1);
	TextDrawSetShadow(Textdraw13, 1);

	Textdraw14 = TextDrawCreate(33.000000, 435.000000, "_"); //Player online
	TextDrawBackgroundColor(Textdraw14, 255);
	TextDrawFont(Textdraw14, 2);
	TextDrawLetterSize(Textdraw14, 0.180000, 1.100000);
	TextDrawColor(Textdraw14, -1);
	TextDrawSetOutline(Textdraw14, 0);
	TextDrawSetProportional(Textdraw14, 1);
	TextDrawSetShadow(Textdraw14, 1);

	Textdraw15 = TextDrawCreate(281.000000, 435.000000, "L 100%"); // ainda falta o sistema 
	TextDrawBackgroundColor(Textdraw15, 255);
	TextDrawFont(Textdraw15, 2);
	TextDrawLetterSize(Textdraw15, 0.180000, 1.100000);
	TextDrawColor(Textdraw15, -1);
	TextDrawSetOutline(Textdraw15, 0);
	TextDrawSetProportional(Textdraw15, 1);
	TextDrawSetShadow(Textdraw15, 1);

	Textdraw16 = TextDrawCreate(281.000000, 424.000000, "C 100%");// ainda falta o sistema 
	TextDrawBackgroundColor(Textdraw16, 255);
	TextDrawFont(Textdraw16, 2);
	TextDrawLetterSize(Textdraw16, 0.180000, 1.100000);
	TextDrawColor(Textdraw16, -1);
	TextDrawSetOutline(Textdraw16, 0);
	TextDrawSetProportional(Textdraw16, 1);
	TextDrawSetShadow(Textdraw16, 1);
OnPlayerSpawn
Код:
        //status player
	TextDrawShowForPlayer(playerid, Textdraw0);
	TextDrawShowForPlayer(playerid, Textdraw1);
	TextDrawShowForPlayer(playerid, Textdraw2);
	TextDrawShowForPlayer(playerid, Textdraw3);
	TextDrawShowForPlayer(playerid, Textdraw4);
	TextDrawShowForPlayer(playerid, Textdraw5);
	TextDrawShowForPlayer(playerid, Textdraw6);
	TextDrawShowForPlayer(playerid, Textdraw7);
	TextDrawShowForPlayer(playerid, Textdraw8);
	TextDrawShowForPlayer(playerid, Textdraw9);
	TextDrawShowForPlayer(playerid, Textdraw10);
	TextDrawShowForPlayer(playerid, Textdraw15);
	TextDrawShowForPlayer(playerid, Textdraw16);
aq o final
Код:
public statusdoplayer(playerid)
{
    new newtext[200];
    format(newtext, sizeof(newtext), "%i", GetPlayerScore(playerid));
    TextDrawSetString(Textdraw11, newtext);
    TextDrawShowForPlayer(playerid, Textdraw11);

    format(newtext, sizeof(newtext), "%i",PlayerInfo[playerid][pKills]);
    TextDrawSetString(Textdraw12, newtext);
    TextDrawShowForPlayer(playerid, Textdraw12);

    format(newtext, sizeof(newtext), "%i", PlayerInfo[playerid][pDeaths]);
    TextDrawSetString(Textdraw13, newtext);
    TextDrawShowForPlayer(playerid, Textdraw13);

    format(newtext, sizeof(newtext), "%i/100", GetOnLinePlayers());
    TextDrawSetString(Textdraw14, newtext);
    TextDrawShowForPlayer(playerid, Textdraw14);

    return 1;
}

stock GetOnLinePlayers()
{
	new OnLine;
	for(new i, g = GetMaxPlayers(); i < g; i++)
		if(IsPlayerConnected(i))
			OnLine++;
	return OnLine;
}
Reply


Messages In This Thread
TextDraw de status bugado - by djgabrielway - 03.07.2015, 03:29
Re: TextDraw de status bugado - by IgorLuiz - 03.07.2015, 03:42
Re: TextDraw de status bugado - by SepZ - 03.07.2015, 03:43
Re: TextDraw de status bugado - by djgabrielway - 03.07.2015, 04:33
Re: TextDraw de status bugado - by IgorLuiz - 03.07.2015, 04:50
Re: TextDraw de status bugado - by djgabrielway - 03.07.2015, 05:06
Re: TextDraw de status bugado - by IgorLuiz - 03.07.2015, 05:29
Re: TextDraw de status bugado - by ipsLuan - 03.07.2015, 14:13
Re: TextDraw de status bugado - by djgabrielway - 04.07.2015, 04:54

Forum Jump:


Users browsing this thread: 1 Guest(s)