[AJUDA] Kills em TextDraw
#1

Bom estou criando um sistema onde faz a contagem dos kills de cops e kills de zumbis..
Mas nao sei o que esta acontecendo que nao aparece o textdraw quando eu Abro o evento...

o que pode estar errado ?

TOPO
pawn Код:
new MatouCop;
new MatouZumbi;
new Text:cop[MAX_PLAYERS];
new Text:zumbi[MAX_PLAYERS];
pawn Код:
public OnFilterScriptInit()
{
    foreach(new i : Player)
    {
        cop[i] = TextDrawCreate(500, 120, "~b~Cops: ~w~%d");
        TextDrawBackgroundColor(cop[i], 255);
        TextDrawFont(cop[i], 1);
        TextDrawLetterSize(cop[i], 0.69, 1.4000);
        TextDrawColor(cop[i], 0x0000FFFF);
        TextDrawSetOutline(cop[i], 1);
        TextDrawSetProportional(cop[i], 1);

        zumbi[i] = TextDrawCreate(500, 100, "~r~Zumbis: ~w~%d");
        TextDrawBackgroundColor(zumbi[i], 255);
        TextDrawFont(zumbi[i], 1);
        TextDrawLetterSize(zumbi[i], 0.69, 1.4000);
        TextDrawColor(zumbi[i], COR_VERMELHOE);
        TextDrawSetOutline(zumbi[i], 1);
        TextDrawSetProportional(zumbi[i], 1);
    }

No comando para iniciar o Evento e quando o player aceita ir а ele
pawn Код:
TextDrawShowForPlayer(playerid, cop[playerid]);
TextDrawShowForPlayer(playerid, zumbi[playerid]);

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(Player[killerid][NoZumbi] == true)
    {
        if(Player[killerid][Cop] == true)
        {
            MatouZumbi++;
            format(Str, sizeof(Str), "~b~Cops: ~w~%d", MatouZumbi);
            TextDrawSetString(cop[killerid], Str);
        }
        if(Player[killerid][Zumbi] == true)
        {
            MatouCop++;
            format(Str, sizeof(Str), "~r~Zumbis: ~w~%d", MatouCop);
            TextDrawSetString(zumbi[killerid], Str);
        }
Reply
#2

pawn Код:
public OnFilterScriptInit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        cop[i] = TextDrawCreate(500, 120, "~b~Cops: ~w~%d");
        TextDrawBackgroundColor(cop[i], 255);
        TextDrawFont(cop[i], 1);
        TextDrawLetterSize(cop[i], 0.69, 1.4000);
        TextDrawColor(cop[i], 0x0000FFFF);
        TextDrawSetOutline(cop[i], 1);
        TextDrawSetProportional(cop[i], 1);
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        zumbi[i] = TextDrawCreate(500, 100, "~r~Zumbis: ~w~%d");
        TextDrawBackgroundColor(zumbi[i], 255);
        TextDrawFont(zumbi[i], 1);
        TextDrawLetterSize(zumbi[i], 0.69, 1.4000);
        TextDrawColor(zumbi[i], COR_VERMELHOE);
        TextDrawSetOutline(zumbi[i], 1);
        TextDrawSetProportional(zumbi[i], 1);
    }
Reply
#3

Quote:
Originally Posted by RoacH`
Посмотреть сообщение
pawn Код:
public OnFilterScriptInit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        cop[i] = TextDrawCreate(500, 120, "~b~Cops: ~w~%d");
        TextDrawBackgroundColor(cop[i], 255);
        TextDrawFont(cop[i], 1);
        TextDrawLetterSize(cop[i], 0.69, 1.4000);
        TextDrawColor(cop[i], 0x0000FFFF);
        TextDrawSetOutline(cop[i], 1);
        TextDrawSetProportional(cop[i], 1);
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        zumbi[i] = TextDrawCreate(500, 100, "~r~Zumbis: ~w~%d");
        TextDrawBackgroundColor(zumbi[i], 255);
        TextDrawFont(zumbi[i], 1);
        TextDrawLetterSize(zumbi[i], 0.69, 1.4000);
        TextDrawColor(zumbi[i], COR_VERMELHOE);
        TextDrawSetOutline(zumbi[i], 1);
        TextDrawSetProportional(zumbi[i], 1);
    }
facepalm!
Reply
#4

Quote:
Originally Posted by AFerreira
Посмотреть сообщение
facepalm!
rsrs
ne '-'

da uma forзa ae AFerreira
Reply
#5

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(Player[killerid][Nozumbi] == true)
    {
        if(Player[killerid][cop] == true)
        {
            Matouzumbi++;
            format(Str, sizeof(Str), "~b~cops: ~w~%d", Matouzumbi);
            TextDrawSetString(cop[killerid], Str);
            TextDrawShowForPlayer(playerid, cop[killerid]);
        }
        if(Player[killerid][zumbi] == true)
        {
            Matoucop++;
            format(Str, sizeof(Str), "~r~zumbis: ~w~%d", Matoucop);
            TextDrawSetString(zumbi[killerid], Str);
            TextDrawShowForPlayer(playerid, zumbi[killerid]);
        }
Tenta.
Reply
#6

Quote:
Originally Posted by AFerreira
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(Player[killerid][Nozumbi] == true)
    {
        if(Player[killerid][cop] == true)
        {
            Matouzumbi++;
            format(Str, sizeof(Str), "~b~cops: ~w~%d", Matouzumbi);
            TextDrawSetString(cop[killerid], Str);
            TextDrawShowForPlayer(playerid, cop[killerid]);
        }
        if(Player[killerid][zumbi] == true)
        {
            Matoucop++;
            format(Str, sizeof(Str), "~r~zumbis: ~w~%d", Matoucop);
            TextDrawSetString(zumbi[killerid], Str);
            TextDrawShowForPlayer(playerid, zumbi[killerid]);
        }
Tenta.
ok, vou tentar, mas o problema esta na hora de mostrar a textdraw quando inicia o evento..

vou ver aki e dou um Edit
Reply
#7

@double post

Bom, nгo apareceu a textdraw :S
Reply
#8

Poste a funзгo/comando que abre o evento.
Reply
#9

Quote:
Originally Posted by RoacH`
Посмотреть сообщение
pawn Код:
public OnFilterScriptInit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        cop[i] = TextDrawCreate(500, 120, "~b~Cops: ~w~%d");
        TextDrawBackgroundColor(cop[i], 255);
        TextDrawFont(cop[i], 1);
        TextDrawLetterSize(cop[i], 0.69, 1.4000);
        TextDrawColor(cop[i], 0x0000FFFF);
        TextDrawSetOutline(cop[i], 1);
        TextDrawSetProportional(cop[i], 1);
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        zumbi[i] = TextDrawCreate(500, 100, "~r~Zumbis: ~w~%d");
        TextDrawBackgroundColor(zumbi[i], 255);
        TextDrawFont(zumbi[i], 1);
        TextDrawLetterSize(zumbi[i], 0.69, 1.4000);
        TextDrawColor(zumbi[i], COR_VERMELHOE);
        TextDrawSetOutline(zumbi[i], 1);
        TextDrawSetProportional(zumbi[i], 1);
    }
Para que dois loops? .-.
Tenta fazer um if pra verificar se o player estб no evento e joga TextDrawShowForAll para os que estгo no evento. Use loop.
Reply
#10

Quote:
Originally Posted by Macintosh
Посмотреть сообщение
Para que dois loops? .-.
Tenta fazer um if pra verificar se o player estб no evento e joga TextDrawShowForAll para os que estгo no evento. Use loop.
eu estou usando foreach

Entao, o TextDraw ele nem aparecer aparece ao player, tentei colocar TextDrawShowForPlayer, TextDrawShowForAll....... em OnPlayerConnect para ver se tinha bugs, e nao apareceu tambem...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)