[Ajuda] Nгo define - 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] Nгo define (
/showthread.php?tid=471514)
Nгo define -
lekinho911 - 23.10.2013
Nгo postei o comando todo sу o estilo de definiзгo ... Ele TA Definindo pra BOPE mas pra PM nгo
pawn Код:
new str[128];
new Float:x, Float:y, Float:z,Float:a;
if(PlayerInfo[playerid][pBOPE] != 1 || PlayerInfo[playerid][pPM] != 1)
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode usar este comando!");
return 1;
}
Re: Nгo define -
Dolby - 23.10.2013
pawn Код:
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0)
Re: Nгo define -
lekinho911 - 23.10.2013
Mas se for igual a 0 qualquer 1 vai conseguir ou nгo ? e tipow se eu quisesse para mais de 2 ?
Re: Nгo define -
Dolby - 23.10.2013
Quote:
Originally Posted by lekinho911
Mas se for igual a 0 qualquer 1 vai conseguir ou nгo ? e tipow se eu quisesse para mais de 2 ?
|
pawn Код:
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0)
No caso, ele vai verificar se o jogador
NГO faz parte de nenhuma das "Organizaзхes", caso queria adicionar mais apenas use:
pawn Код:
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0 && ORG3 == 0)
Substituindo o
ORG3 pela sua variбvel da Organizaзгo.
Enfim, recomendo que estude
Estruturas Condicionais e
Operadores.
Re: Nгo define -
lekinho911 - 23.10.2013
vish complicado
Re: Nгo define -
focaximubh - 23.10.2013
Quote:
Originally Posted by lekinho911
vish complicado 
|
Nгo, nгo й complicado, basta vocк querer... Veja:
Usando o cуdigo do amigo ali em cima...
pawn Код:
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0 && ORG3 == 0)
pawn Код:
if(PlayerInfo[playerid][pBOPE] == 0 // Aqui ele estб Perguntando vocк й do bope? 0 nгo 1 = sim
PlayerInfo[playerid][pPM] == 0 // Vocк й da PM?
mesma coisa de cima... agora fassa ahhh quere que ele precise ser da swat tbm...
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0 && ORG3 == 0)
peguei o cуdigo de cima, veja:
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0 && ORG3 == 0)//Antes do ")" irei adicionar:
&& Variavйl de salvamento ficando assim:
if(PlayerInfo[playerid][pBOPE] == 0 && PlayerInfo[playerid][pPM] == 0 && ORG3 == 0 && PlayerInfo[playerid][pSwat] == 0) //e aassim por diante, sempre antes do )
Re: Nгo define -
lekinho911 - 23.10.2013
aaah essa ORG3 й uma outra variavel que eu posso botar exemplo
pawn Код:
PlayerInfo[playerid][pPM]
substituindo pela ORG3 ?aah entendi essa ORG3 й sу um exemplo obrigado ai rep +