[Ajuda] Dъvidas Curtas #1

Vou tentar vlws '-'

@Edit
Fiz o player entrou no server e a musica continuou tocando mesmo tendo StopAudioStreamForPlayer no OnPlayerConnect LOOOOOL #desisti '--'
Reply

Quote:

Vou tentar vlws '-'

@Edit
Fiz o player entrou no server e a musica continuou tocando mesmo tendo StopAudioStreamForPlayer no OnPlayerConnect LOOOOOL #desisti '--'

Pergunta pro Mandrakke jб que vocк ta querendo copiar isso do braz.
Reply

Quote:
Originally Posted by delete
Посмотреть сообщение
Pergunta pro Mandrakke jб que vocк ta querendo copiar isso do braz.
[ame]http://www.youtube.com/watch?v=4TceMlRjE2o[/ame]
Ah mano eu nгo te devo porra de nada e nunca vou dever,
Vai cuidar da merda do teu server e nгo responda nada o que eu citar aqui por favor.
E caso nгo saiba eu nгo to fazendo esse servidor sozinho portanto nгo fui eu que tomei essa decisгo seu inъtil.
Reply

alguem pode me ajuda com isso aqui?

eu to usando a streamer e coloquei a include e plugin tudo certinho mais da um warning..

pawn Код:
\pawno\include\streamer.inc(334) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
e eu nгo tenho a minima ideia do que seja... alguem pode me ajudar? valeu.
Reply

Quote:
Originally Posted by Digao
Посмотреть сообщение
alguem pode me ajuda com isso aqui?

eu to usando a streamer e coloquei a include e plugin tudo certinho mais da um warning..

pawn Код:
\pawno\include\streamer.inc(334) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
e eu nгo tenho a minima ideia do que seja... alguem pode me ajudar? valeu.
Faзa um ALS na Include.
Reply

nгo entendi, pode explicar melhor? .-.
Reply

Quote:
Originally Posted by Digao
Посмотреть сообщение
nгo entendi, pode explicar melhor? .-.
pawn Код:
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit GameModeInitEX
forward GameModeInitEx();
e no return do OnGameModeInit da include,use
pawn Код:
return CallLocalFunction("GameModeInitEx", "");
Caso nгo dк certo,use Y_Hooks.
Reply

nem deu... deu mais um warning..

pawn Код:
\gamemodes\BPP.pwn(10495) : warning 235: public function lacks forward declaration (symbol "GameModeInitEX")
mais valeu ai, vou tentar usar isso ae que vocк falou.. se alguem tiver como me ajudar ai, por favor poste.

valeu
Reply

Quote:
Originally Posted by Digao
Посмотреть сообщение
nem deu... deu mais um warning..

pawn Код:
\gamemodes\BPP.pwn(10495) : warning 235: public function lacks forward declaration (symbol "GameModeInitEX")
mais valeu ai, vou tentar usar isso ae que vocк falou.. se alguem tiver como me ajudar ai, por favor poste.

valeu
Toda Public deverб haver um forward...

pawn Код:
forward GameModeInitEX();
Reply

Jб tinha a forward..

usei isso q o gustavo me passo

pawn Код:
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit GameModeInitEX
forward GameModeInitEx();
o problema й que tem outra OnGameModeInit dentro da include.... oq eu posso fazer? posso pegar os dados dessa include do OnGameModeInit e colocar no GM? .-.
Reply

Quote:
Originally Posted by Digao
Посмотреть сообщение
Jб tinha a forward..

usei isso q o gustavo me passo

pawn Код:
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit GameModeInitEX
forward GameModeInitEx();
o problema й que tem outra OnGameModeInit dentro da include.... oq eu posso fazer? posso pegar os dados dessa include do OnGameModeInit e colocar no GM? .-.
Alias,fail meu,tente:
pawn Код:
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit OnGameModeInitEX
forward OnGameModeInitEx();
Obs: na Include em...
Reply

deu 2 warnings ainda..

pawn Код:
\pawno\include\streamer.inc(334) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
\BPP 0.3e\gamemodes\BPP.pwn(10497) : warning 235: public function lacks forward declaration (symbol "GameModeInitEX")
a linha 10497 й essa

pawn Код:
public OnGameModeInit()
minha include fico assim..

pawn Код:
public OnGameModeInit()
{
    Streamer_g_OPC = funcidx("Streamer_OnPlayerConnect") != -1;
    Streamer_g_OPDC = funcidx("Streamer_OnPlayerDisconnect") != -1;
    Streamer_g_OPEO = funcidx("Streamer_OnPlayerEditObject") != -1;
    Streamer_g_OPSO = funcidx("Streamer_OnPlayerSelectObject") != -1;
    Streamer_g_OPPP = funcidx("Streamer_OnPlayerPickUpPickup") != -1;
    Streamer_g_OPEC = funcidx("Streamer_OnPlayerEnterCP") != -1;
    Streamer_g_OPLC = funcidx("Streamer_OnPlayerLeaveCP") != -1;
    Streamer_g_OPERC = funcidx("Streamer_OnPlayerEnterRaceCP") != -1;
    Streamer_g_OPLRC = funcidx("Streamer_OnPlayerLeaveRaceCP") != -1;
    if (funcidx("Streamer_OnGameModeInit") != -1)
    {
        return CallLocalFunction("Streamer_OnGameModeInit", "");
    }
    return CallLocalFunction("GameModeInitEx", "");
}

#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit GameModeInitEX
forward OnGameModeInitEx();
\=
Reply

pawn Код:
\BPP 0.3e\gamemodes\BPP.pwn(10497) : warning 235: public function lacks forward declaration (symbol "GameModeInitEX")
eu acho que tem que add
pawn Код:
forward GameModeInitEX (playerid);
eu acho que e isso ae
o 1 caso ae o erro nao e nessa linha e ne outra!
Reply

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/dinheiro", true) == 0)
{
    if(GetPlayerMoney(playerid) < 60000)
    {
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Saldo maior que o permitido.");
    }
    else
    {
        GivePlayerMoney(playerid,10000);
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    }
    return 1;
}
Assim estб certo...
Sem contar que falta o return, para impedir que o resto do cуdigo seja executado.
Reply

Quote:
Originally Posted by FeelLikeASir_
Посмотреть сообщение
Sem contar que falta o return, para impedir que o resto do cуdigo seja executado.
Nгo era preciso de return. (Creio)
Pois, ele fexou o primeiro if, e abriu um else, para o outro.
Reply

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Nгo sabe oque quer dizer:
pawn Код:
}else{
?
Nгo importa se tenha else, o cуdigo continuarб sendo interpretado.
pawn Код:
if(strcmp(cmd, "/dinheiro", true) == 0)
{
    if(GetPlayerMoney(playerid) < 60000)
    {
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Saldo maior que o permitido.");
    }
    else
    {
        GivePlayerMoney(playerid,10000);
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    }
    //GivePlayerWeapon(playerid, 23, 50);
    return 1;
}
Caso tenha algum cуdigo encima do ъltimo return, ele ainda serб interpretado, pois nгo foi pausado, como no exemplo. (GivePlayerWeapon serб chamado).
Reply

Quote:
Originally Posted by FeelLikeASir_
Посмотреть сообщение
Nгo importa se tenha else, o cуdigo continuarб sendo interpretado.
pawn Код:
if(strcmp(cmd, "/dinheiro", true) == 0)
{
    if(GetPlayerMoney(playerid) < 60000)
    {
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Saldo maior que o permitido.");
    }
    else
    {
        GivePlayerMoney(playerid,10000);
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    }
    //GivePlayerWeapon(playerid, 23, 50);
    return 1;
}
Caso tenha algum cуdigo encima do ъltimo return, ele ainda serб interpretado, pois nгo foi pausado, como no exemplo. (GivePlayerWeapon serб chamado).
Ah! Acreditei que vocк estava falando da parte debaixo do else.
pawn Код:
}
    else
    {
        GivePlayerMoney(playerid,10000);
        SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    }
..
Reply

Mesmo assim riichard, vocк deve acrescentar um return para pausar o cуdigo ai.
pawn Код:
else
{
    GivePlayerMoney(playerid,10000);
    SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    return true; //para por aqui, o que vem abaixo nгo serб interpretado.
}
Mais se vocк nгo tem nenhuma funзгo alйm do if/else, nгo tem necessidade de colocar o return , apenas no final basta.
Reply

Quote:
Originally Posted by FeelLikeASir_
Посмотреть сообщение
Mesmo assim riichard, vocк deve acrescentar um return para pausar o cуdigo ai.
pawn Код:
else
{
    GivePlayerMoney(playerid,10000);
    SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    return true; //para por aqui, o que vem abaixo nгo serб interpretado.
}
Mais se vocк nгo tem nenhuma funзгo alйm do if/else, nгo tem necessidade de colocar o return em ambos, apenas no final basta.
Mano, vocк nгo entendeu?

Nгo estou dizendo desta parte.

Eu estava pensando que vocк estava dizendo na parte do else. Nгo no final ¬¬
Reply

Quote:
Originally Posted by FeelLikeASir_
Посмотреть сообщение
Mesmo assim riichard, vocк deve acrescentar um return para pausar o cуdigo ai.
pawn Код:
else
{
    GivePlayerMoney(playerid,10000);
    SendClientMessage(playerid, COLOR_WHITE, "[ATENЗГO]: Vocк acabou de receber mais $10000.");
    return true; //para por aqui, o que vem abaixo nгo serб interpretado.
}
Mais se vocк nгo tem nenhuma funзгo alйm do if/else, nгo tem necessidade de colocar o return , apenas no final basta.
E Porquк seria ai? o return fica ao final antes da ultima chave, e nгo dentro da funзгo do else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)