Re: Dъvidas Curtas -
Edu33 - 02.08.2012
Vou tentar vlws '-'
@Edit
Fiz o player entrou no server e a musica continuou tocando mesmo tendo StopAudioStreamForPlayer no OnPlayerConnect LOOOOOL #desisti '--'
Re: Dъvidas Curtas -
Delete_ - 02.08.2012
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.
Re: Dъvidas Curtas -
Edu33 - 02.08.2012
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.
Respuesta: Dъvidas Curtas -
Digao - 02.08.2012
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.
Re: Respuesta: Dъvidas Curtas -
Dolby - 03.08.2012
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.
Respuesta: Dъvidas Curtas -
Digao - 03.08.2012
nгo entendi, pode explicar melhor? .-.
Re: Respuesta: Dъvidas Curtas -
Dolby - 03.08.2012
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.
Respuesta: Dъvidas Curtas -
Digao - 03.08.2012
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
Re: Respuesta: Dъvidas Curtas -
.FuneraL. - 03.08.2012
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();
Respuesta: Dъvidas Curtas -
Digao - 03.08.2012
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? .-.
Re: Respuesta: Dъvidas Curtas -
Dolby - 03.08.2012
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...
Respuesta: Dъvidas Curtas -
Digao - 03.08.2012
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
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();
\=
AW: Dъvidas Curtas -
billy the kid - 03.08.2012
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!
Re: Dъvidas Curtas -
FeelLikeASir_ - 13.08.2012
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.
Re: Dъvidas Curtas -
@Riichard - 13.08.2012
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.
Re: Dъvidas Curtas -
FeelLikeASir_ - 13.08.2012
Quote:
Originally Posted by @Riichard
Nгo sabe oque quer dizer:
?
|
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).
Re: Dъvidas Curtas -
@Riichard - 13.08.2012
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.");
}
..
Re: Dъvidas Curtas -
FeelLikeASir_ - 13.08.2012
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.
Re: Dъvidas Curtas -
@Riichard - 13.08.2012
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 ¬¬
Re: Dъvidas Curtas -
.FuneraL. - 13.08.2012
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.