[Ajuda] Text Draws randomicos
#1

Eae galera beleza? estou criando um gm e vou fazer uma text randфmica mais eu crio ela tudo de boa, dai nгo peg, nгo aparece no server.. (nгo tem nenhum erro)

Code:

pawn Код:
new Text:InfoHELP;

new HELPMSGS[][] =
{
    " ~g~Use ~r~/help ~g~for se all server commands.",
    " ~g~No use hackers or resulted in ~r~ban~g~.",
    " ~g~Respect the ~r~admins ~g~and ~r~players ~g~or resulted in kick or ban.",
    " ~g~follow our rules, use ~r~/rules ~g~for the list."
};

forward RANDOMHELPMSGS();

SetTimer("HELPMSGS",5000,1); // 5 segundos para testar..

    // ---- HELP ----
    InfoHELP = TextDrawCreate(5.431,430,"__");
    TextDrawFont(InfoHELP,2);
    TextDrawLetterSize(InfoHELP,0.2,1.1);
    TextDrawColor(InfoHELP,-1);
    TextDrawSetOutline(InfoHELP,1);
    TextDrawSetProportional(InfoHELP,1);
    TextDrawSetShadow(InfoHELP,1);

public RANDOMHELPMSGS()
{
    TextDrawSetString(Text:InfoHELP,HELPMSGS[random(sizeof(HELPMSGS))]);
    return 1;
}

TextDrawShowForPlayer(playerid,InfoHELP);

TextDrawHideForPlayer(playerid,InfoHELP);
Reply
#2

Faz ele criar uma textdraw com uma frase ao se connectar e coloca essa SetTimer em OnPlayerConnect resolvera seu problema.
Reply
#3

Tenta assim:
pawn Код:
public RANDOMHELPMSGS()
{
    TextDrawHideForAll(InfoHELP);
    TextDrawSetString(InfoHELP,HELPMSGS[random(sizeof(HELPMSGS))]);
    TextDrawShowForAll(InfoHELP);
    return 1;
}
Com o SetTimer em OnGameModeInit e retire os outros TextDrawHideForPlayer/TextDrawShowForPlayer
Reply
#4

pawn Код:
public RANDOMHELPMSGS()
{
    TextDrawSetString(InfoHELP,HELPMSGS[random(sizeof(HELPMSGS))]);
    return 1;
}
Coloque o Timer em OnPlayerConnect e Tire Isto:

pawn Код:
TextDrawHideForPlayer(playerid,InfoHELP);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)