Warning -
matheusspohr - 21.04.2015
Fala galera boa do forum, por "recomendaзхes" baixei o GM PPC_Trucking para estudos, so q ele veio com 4 warnings, 3 jб removi, mais tem 1 que nгo estou conseguindo, se puderem me ajudar, fico grato...
PHP код:
//Warning
H:\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(182) : warning 225: unreachable code
PHP код:
if (APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");
Abraзos...
Re: Warning - Whoo - 21.04.2015
Quote:
Originally Posted by matheusspohr
Fala galera boa do forum, por "recomendaзхes" baixei o GM PPC_Trucking para estudos, so q ele veio com 4 warnings, 3 jб removi, mais tem 1 que nгo estou conseguindo, se puderem me ajudar, fico grato...
PHP код:
//Warning
H:\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(182) : warning 225: unreachable code
PHP код:
if (APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");
Abraзos...
|
manda as linhas antes dessa deve haver algum return
Re: Warning -
Vegassilva - 21.04.2015
Manda o comando todo ..
Re: Warning -
DiegoCosta - 21.04.2015
Quote:
Originally Posted by matheusspohr
Fala galera boa do forum, por "recomendaзхes" baixei o GM PPC_Trucking para estudos, so q ele veio com 4 warnings, 3 jб removi, mais tem 1 que nгo estou conseguindo, se puderem me ajudar, fico grato...
PHP код:
//Warning
H:\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(182) : warning 225: unreachable code
PHP код:
if (APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");
Abraзos...
|
Tente dessa forma:
PHP код:
if (APlayerData[playerid][RulesRead] == false)
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");
Re: Warning -
matheusspohr - 21.04.2015
Nao й comando, isto fica na public onplayerconnect, postei a public no Pastebin:
Public
Abraзos.
Re: Warning -
DiegoCosta - 21.04.2015
Quote:
Originally Posted by matheusspohr
Nao й comando, isto fica na public onplayerconnect, postei a public no Pastebin:
Public
Abraзos.
|
E quem disse que estou postando algum comando

O que postei estб na OnPlayerConnect, faзa o que eu disse e veja se funciona.
Quando vc coloca o "If" vc jб da a condiзгo "SE", ou seja, vc declara que "SE" o playr nгo leu as regras, automaticamente serб mostrada a mensagem а ele, nгo precisa fazer o "return".
Re: Warning -
DiegoCosta - 21.04.2015
E tem mais um "erro" ali na sua OnPlayerConnect:
Quote:
// MissionText TextDraw setup
APlayerData[playerid][MissionText] = TextDrawCreate(321.0, 430.0, " ");// Setup the missiontext at the bottom of the screen
TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Align the missiontext to the center
TextDrawUseBox(APlayerData[playerid][MissionText], 1); // Set the missiontext to display inside a box
TextDrawBoxColor(APlayerData[playerid][MissionText], 0x00000066); // Set the box color of the missiontext
return 1;
// Display a message if the player hasn't accepted the rules yet
if(APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid, 0xFFFFFFFF, "Vocк Ainda Nгo Aceitou As Regras...");
return 1;
|
Esses dois returns em vermelho sгo desnecessarios.
Re: Warning -
matheusspohr - 21.04.2015
Quote:
Originally Posted by Vegassilva
Manda o comando todo ..
|
Foi Este Que Falo Para Mandar O Comando Todo, sei oque significa "If"...
Bom, retirei o 1є Return que vocк falou, e ja esta funcionando, Obrigado...
Abraзos.
Re: Warning -
DiegoCosta - 21.04.2015
Quote:
Originally Posted by matheusspohr
Foi Este Que Falo Para Mandar O Comando Todo, sei oque significa "If"...
Bom, retirei o 1є Return que vocк falou, e ja esta funcionando, Obrigado...
Abraзos.
|
Desculpe, й que eu estava postando, pra mim ainda nгo havia aparecido os outros 2 posts. Verifique se o outro return "extra" nгo vai bugar o restante depois (as missiontext, no caso)
Re: Warning -
matheusspohr - 21.04.2015
Bom, eu acho que nгo pois:
PHP код:
if (APlayerData[playerid][RulesRead] == false)//Verifica Se O Player 'X' Leu As Regras
return // Vai retornar
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");//Mensagem Ao Player 'X' Na cor 'Branca'
//Apуs:
Return 1;
}//Apуs isto ele irб retornar o fim de uma parte da Callback
Abraзos.