[Ajuda] Sitema de admin
#1

Ola galera vim aqui pedir ajuda tipo to editando um gm to mechendo no sistema de admin do gm
ai eu to botando que quando eu do adm lvl 5 direto pro cara ele nao ver a 2 3 etc
ai o vini me falou que era o simbolo ai eu troquei mas quando eu do lvl 5 ele aparece so a 5
mas quando eu quero dar mais eu do a 4 ai some a 5 alguem sabe pq

pawn Код:
if( PlayerInfo[playerid][pAdmin] == 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
  }
  if( PlayerInfo[playerid][pAdmin] == 2){
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 2] /antixiter");
  }
Reply
#2

pawn Код:
if( PlayerInfo[playerid][pAdmin] != 1)
Reply
#3

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
pawn Код:
if( PlayerInfo[playerid][pAdmin] != 1)
Nem deu .
Reply
#4

pawn Код:
if( PlayerInfo[playerid][pAdmin] == 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
  }
  else if( PlayerInfo[playerid][pAdmin] == 2){
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 2] /antixiter");
  }
Ou entгo pode usar switch.
Reply
#5

Quote:
Originally Posted by mau.tito
Посмотреть сообщение
Ola galera vim aqui pedir ajuda tipo to editando um gm to mechendo no sistema de admin do gm
ai eu to botando que quando eu do adm lvl 5 direto pro cara ele nao ver a 2 3 etc
ai o vini me falou que era o simbolo ai eu troquei mas quando eu do lvl 5 ele aparece so a 5
mas quando eu quero dar mais eu do a 4 ai some a 5 alguem sabe pq

pawn Код:
if( PlayerInfo[playerid][pAdmin] == 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
  }
  if( PlayerInfo[playerid][pAdmin] == 2){
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 2] /antixiter");
  }
Se vocк quer que apenas mostre esse texto para o admin level 1 e respectivamente admin level 2 a seguinte, o cуdigo apresentado estб correto.
Reply
#6

Quote:
Originally Posted by Pedro_Miranda
Посмотреть сообщение
pawn Код:
if( PlayerInfo[playerid][pAdmin] == 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
  }
  else if( PlayerInfo[playerid][pAdmin] == 2){
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 2] /antixiter");
  }
Ou entгo pode usar switch.
tbm nem pego .
Reply
#7

Em vez de usar o operador igual '==' use maior ou igual '>='

ficaria assim

pawn Код:
if( PlayerInfo[playerid][pAdmin] >= 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
  }
Reply
#8

Quote:
Originally Posted by BlueX
Посмотреть сообщение
Em vez de usar o operador igual '==' use maior ou igual '>='

ficaria assim

pawn Код:
if( PlayerInfo[playerid][pAdmin] >= 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
  }
sim mas se eu desse direto adm lvl 2 pra ele ele veria e usaria o cmd de lvl 1 .
e eu nao quero isso.
Reply
#9

Tenta entгo colocar return

pawn Код:
if( PlayerInfo[playerid][pAdmin] == 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
    return 1;
  }
  if( PlayerInfo[playerid][pAdmin] == 2){
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 2] /antixiter");
    return 1;
  }
Reply
#10

Quote:
Originally Posted by Pedro_Miranda
Посмотреть сообщение
Tenta entгo colocar return

pawn Код:
if( PlayerInfo[playerid][pAdmin] == 1) {
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 1] /tapao )");
    return 1;
  }
  if( PlayerInfo[playerid][pAdmin] == 2){
      SendClientMessage(playerid, COLOR_GREEN,"[Linha 2] /antixiter");
    return 1;
  }

dei a primeira linha ai apareceu a linha 1
dei a linha 2 e sumiu as duas ¬¬


@edit
antes tava apareecendo a 1 mas quando dava a 2 nao aparecia nenhuma
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)