SA-MP Forums Archive
[Ajuda] Cуdigo correto? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Cуdigo correto? (/showthread.php?tid=429206)



Cуdigo correto? - VeNuZ_ - 08.04.2013

Top GM
pawn Код:
//topGM
new Text:THUGMSG;
new THUGMSGR[][] = {
    "TheHateUGave A/D",
    "Visit us in",
    "www.TheHateUGave.com"
};

//OnGameModdeInit

    RandomSiteMSG();
    THUGMSG = TextDrawCreate(16.000000, 328.000000, THUGMSGR[0]);
    TextDrawBackgroundColor(THUGMSG, 255);
    TextDrawFont(THUGMSG, 1);
    TextDrawLetterSize(THUGMSG, 0.469999, 1.000000);
    TextDrawColor(THUGMSG, 6553855);
    TextDrawSetOutline(THUGMSG, 1);
    TextDrawSetProportional(THUGMSG, 1);

// New public

forward RandomSiteMSG();
public RandomSiteMSG()
{
    new s@Msg[128];
    format(s@Msg, 128, "~w~ %s", THUGMSGR[random(sizeof(THUGMSGR))]);
    TextDrawSetString(THUGMSG, s@Msg);
    return SetTimer("RandomSiteMSG", 40000, false);
}
ps: postei isto pq o cуdigo tipo muda as frases mas nгo й tipo de seguida que й como eu quero e tambem as farses nгo ficam com as cores.


Re: Cуdigo correto? - paulor - 08.04.2013

pawn Код:
//topGM
new Text:THUGMSG;
new pMsgAtual = -1;
new THUGMSGR[][] = {
    "TheHateUGave A/D",
    "Visit us in",
    "www.TheHateUGave.com"
};

//OnGameModdeInit

    THUGMSG = TextDrawCreate(16.000000, 328.000000, THUGMSGR[0]);
    TextDrawBackgroundColor(THUGMSG, 255);
    TextDrawFont(THUGMSG, 1);
    TextDrawLetterSize(THUGMSG, 0.469999, 1.000000);
    TextDrawColor(THUGMSG, 6553855);
    TextDrawSetOutline(THUGMSG, 1);
    TextDrawSetProportional(THUGMSG, 1);
    RandomSiteMSG();

// New public

forward RandomSiteMSG();
public RandomSiteMSG()
{
    new s@Msg[128];
    format(s@Msg, 128, "~w~ %s", THUGMSGR[(++pMsgAtual == sizeof(THUGMSGR) ? (pMsgAtual = 0) : (pMsgAtual))]);
    TextDrawSetString(THUGMSG, s@Msg);
    return SetTimer("RandomSiteMSG", 40000, false);
}



Re: Cуdigo correto? - VeNuZ_ - 08.04.2013

Quote:
Originally Posted by paulor
Посмотреть сообщение
pawn Код:
//topGM
new Text:THUGMSG;
new pMsgAtual = -1;
new THUGMSGR[][] = {
    "TheHateUGave A/D",
    "Visit us in",
    "www.TheHateUGave.com"
};

//OnGameModdeInit

    THUGMSG = TextDrawCreate(16.000000, 328.000000, THUGMSGR[0]);
    TextDrawBackgroundColor(THUGMSG, 255);
    TextDrawFont(THUGMSG, 1);
    TextDrawLetterSize(THUGMSG, 0.469999, 1.000000);
    TextDrawColor(THUGMSG, 6553855);
    TextDrawSetOutline(THUGMSG, 1);
    TextDrawSetProportional(THUGMSG, 1);
    RandomSiteMSG();

// New public

forward RandomSiteMSG();
public RandomSiteMSG()
{
    new s@Msg[128];
    format(s@Msg, 128, "~w~ %s", THUGMSGR[(++pMsgAtual == sizeof(THUGMSGR) ? (pMsgAtual = 0) : (pMsgAtual))]);
    TextDrawSetString(THUGMSG, s@Msg);
    return SetTimer("RandomSiteMSG", 40000, false);
}
Nгo fica com as cores


Re: Cуdigo correto? - paulor - 08.04.2013

Quote:
Originally Posted by VeNuZ_
Посмотреть сообщение
Nгo fica com as cores
Que cores ? a ъnica cor lб й a branca '~w~'..


Re: Cуdigo correto? - feliphemort - 08.04.2013

Quote:
Originally Posted by VeNuZ_
Посмотреть сообщение
Nгo fica com as cores
~w~ = Branco
~p~ = Roxo
~y~ = Amarelo
~r~ = Vermelho
~b~ = Azul
~g~ = Verde

E algumas que esqueci


Re: Cуdigo correto? - VeNuZ_ - 08.04.2013

Thx xD