SA-MP Forums Archive
[Ajuda] porque nгo funcionar ? - 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] porque nгo funcionar ? (/showthread.php?tid=489517)



porque nгo funcionar ? - Dieguinho - 22.01.2014

criei esta funзгo so que nгo entendir porque nгo aparecer ??

pawn Код:
format(STRX, sizeof(STRX), "{FFFF00}%s {FFFFFF}criou um evento com {FFFF00}%d {FFFFFF}vaga(s) (») Nome: {FFFF00}%s {FFFFFF}(») Digite: ({FFFF00}/irevento{FFFFFF})", GetPlayerNameEx(playerid), vagas, nome);
    SendClientMessageToAll(-1, STRX);



Re: porque nгo funcionar ? - Lуs - 22.01.2014

Poste o bloco inteiro.


Re: porque nгo funcionar ? - yNexus - 22.01.2014

poem o comando inteiro .


Re: porque nгo funcionar ? - Dieguinho - 22.01.2014

pawn Код:
stock PlayerCreateEvent(playerid, vagas, nome[], Float:eX, Float:eY, Float:eZ, eI)
{
    if(EventoCriado == 1)
    {
        SendClientMessage(playerid, Vermelho, "Um evento jб foi criado, espere terminar para criar outro.");
        return 1;
    }
    if(Proibido == 1)
    {
        Proibido = 0;
    }
    EventoTextDraw = 1;
    EventoCriado = 1;
    VagasNoEvento = vagas;

    eventoX = eX,
    eventoY = eY,
    eventoZ = eZ,
    interiore = eI;

    guerra = GangZoneCreate(eX-100, eY-100, eX+100, eY+100);
    GangZoneShowForAll(guerra, Branco);

    #if defined EventTextUser
    TextDrawShowForAll(Stakline);
    #endif

    Staktimer = SetTimerEx("Nupdate", 900, 1, "e", playerid);
    GameTextForAll("~y~Evento ~g~Criado ~y~Use ~b~/irevento", 6000, 1);

    //new string2[256];
    format(STRX, sizeof(STRX), "{FFFF00}%s {FFFFFF}criou um evento com {FFFF00}%d {FFFFFF}vaga(s) (») Nome: {FFFF00}%s {FFFFFF}(») Digite: ({FFFF00}/irevento{FFFFFF})", GetPlayerNameEx(playerid), vagas, nome);
    SendClientMessageToAll(-1, STRX);

    SendClientMessage(playerid, 0x008000AA, "Evento criado com sucesso use: /comecarevento quando vocк for inicia-lo.");
    SendClientMessage(playerid, 0x008000AA, "Caso vocк queira cancela-lo use: /cancelarevento");
    return 1;
}



Re: porque nгo funcionar ? - Lуs - 22.01.2014

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
pawn Код:
stock PlayerCreateEvent(playerid, vagas, nome[], Float:eX, Float:eY, Float:eZ, eI)
{
    if(EventoCriado == 1)
    {
        SendClientMessage(playerid, Vermelho, "Um evento jб foi criado, espere terminar para criar outro.");
        return 1;
    }
    if(Proibido == 1)
    {
        Proibido = 0;
    }
    EventoTextDraw = 1;
    EventoCriado = 1;
    VagasNoEvento = vagas;

    eventoX = eX,
    eventoY = eY,
    eventoZ = eZ,
    interiore = eI;

    guerra = GangZoneCreate(eX-100, eY-100, eX+100, eY+100);
    GangZoneShowForAll(guerra, Branco);

    #if defined EventTextUser
    TextDrawShowForAll(Stakline);
    #endif

    Staktimer = SetTimerEx("Nupdate", 900, 1, "e", playerid);
    GameTextForAll("~y~Evento ~g~Criado ~y~Use ~b~/irevento", 6000, 1);

    //new string2[256];
    format(STRX, sizeof(STRX), "{FFFF00}%s {FFFFFF}criou um evento com {FFFF00}%d {FFFFFF}vaga(s) (») Nome: {FFFF00}%s {FFFFFF}(») Digite: ({FFFF00}/irevento{FFFFFF})", GetPlayerNameEx(playerid), vagas, nome);
    SendClientMessageToAll(-1, STRX);

    SendClientMessage(playerid, 0x008000AA, "Evento criado com sucesso use: /comecarevento quando vocк for inicia-lo.");
    SendClientMessage(playerid, 0x008000AA, "Caso vocк queira cancela-lo use: /cancelarevento");
    return 1;
}
Cade o vetor STRX sendo criado aн? Й global?

pawn Код:
new string2[256];
format(string2, sizeof(string2), "{FFFF00}%s {FFFFFF}criou um evento com {FFFF00}%d {FFFFFF}vaga(s) (») Nome: {FFFF00}%s {FFFFFF}(») Digite: ({FFFF00}/irevento{FFFFFF})", GetPlayerNameEx(playerid), vagas, nome);
SendClientMessageToAll(-1, string2);



Re: porque nгo funcionar ? - Dieguinho - 22.01.2014

pois e ja tentei assim tambem penso que dever ter notado a funзгo new string2;

e porque eu ja tentei !


Re: porque nгo funcionar ? - Lуs - 22.01.2014

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
pois e ja tentei assim tambem penso que dever ter notado a funзгo new string2;

e porque eu ja tentei !
As outras mensagens sгo enviadas?


Re: porque nгo funcionar ? - Gii - 22.01.2014

Novamente volto a lhe alertar sobre isto:
pawn Код:
SetTimerEx("Nupdate", 900, 1, "e", playerid);

PHP код:
"e" 
Код:
i	 Stands for an integer parameter.
d	 Exactly the same as i.
a	 Passes an array, the next parameter must be an integer ("i") with the array's size. [CURRENTLY UNUSABLE]
s	 Stands for a string parameter. [CURRENTLY UNUSABLE]
f	 Stands for a float parameter.
b	 Stands for a boolean parameter.
Fonte:https://sampwiki.blast.hk/wiki/SetTimerEx


Re: porque nгo funcionar ? - Dieguinho - 22.01.2014

Quote:
Originally Posted by Lуs
Посмотреть сообщение
As outras mensagens sгo enviadas?
sim, serб que poder ser as cores que eu coloquei com {FFFFFF} ??