[AJUDA] Com Comando aqui!
#1

Galera, eu peguei o comando de um outro GM e fui copiando letra por letra e fazendo as modificaзхes nele para colocar no meu GM de Gang War, sу que ele esta meio problematico. Sei la '-'.

Quando eu seto o level de alguem seta normal mas a mensagem que vem pra mim й que setei meu proprio level ¬¬' e quando outra pessoa usa funfa normal '-'

Parece que o problema esta so com o ID 0, meu amigo testo e ele entro com ID 1 ai pra ele aparece que seto meu level direitinho, mas pra mim ainda apareceu que to setando meu proprio level ¬¬!

aqui o comando:

PHP код:
if(strcmp(cmd"/setlevel"true) == 0)
    {
            new 
string[128];
            new 
plo;
            new 
Level;
            new 
iddele;
            new 
giveplayername[MAX_PLAYER_NAME];
            if(!
IsPlayerAdmin(playerid))
            {
                
SendClientMessage(playeridCOR_CINZA1," Vocк nгo й Administrador!");
                return 
0x01;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOR_CINZA2,"Uso correto: /setlevel [id player] [level]");
                return 
0x01;
            }
            
iddele strval(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOR_CINZA3,"Uso correto: /setlevel [id player] [level]");
                return 
0x01;
            }
            if(!
IsPlayerConnected(iddele))
            {
                
SendClientMessage(playeridCOR_CINZA1,"Jogador estб OffLine");
                return 
0x01;
            }
            
Level strval(tmp);
            if(
iddele != INVALID_PLAYER_ID)
              {
                
GetPlayerName(plogiveplayernamesizeof(giveplayername));
                
GetPlayerName(playeridnomefodasizeof(nomefoda));
                
format(stringsizeof(string), "Vocк setou o level do %s para %d "giveplayernameLevel);
                
SendClientMessage(playeridCOR_VERDEstring);
                
format(stringsizeof(string), "O administrador %s setou seu level para %d"nomefodaLevel);
                
SendClientMessage(iddeleCOR_VERDEstring);
                
SetPlayerScore(iddeleLevel);
                }
            return 
0x01;
            } 
Reply
#2

looks like it would work
Reply
#3

Tenta ai.
pawn Код:
if(strcmp(cmd, "/setlevel", true) == 0)
    {
            new string[128];
            new plo;
            new Level;
            new iddele;
            new giveplayername[MAX_PLAYER_NAME];
            new nomefoda [MAX_PLAYER_NAME];
            if(!IsPlayerAdmin(playerid))
            {
                SendClientMessage(playerid, COLOR_WHITE," Vocк nгo й Administrador!");
                return 0x01;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE,"Uso correto: /setlevel [id player] [level]");
                return 0x01;
            }
            iddele = strval(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE,"Uso correto: /setlevel [id player] [level]");
                return 0x01;
            }
            if(!IsPlayerConnected(iddele))
            {
                SendClientMessage(playerid, COLOR_WHITE,"Jogador estб OffLine");
                return 0x01;
            }
            Level = strval(tmp);
            if(iddele != INVALID_PLAYER_ID)
              {
                GetPlayerName(plo, giveplayername, sizeof(giveplayername));
                GetPlayerName(playerid, nomefoda, sizeof(nomefoda));
                format(string, sizeof(string), "Vocк setou o level do %s para %d ", giveplayername, Level);
                SendClientMessage(playerid, COLOR_WHITE, string);
                format(string, sizeof(string), "O administrador %s setou seu level para %d", nomefoda, Level);
                SendClientMessage(plo, COLOR_WHITE, string);
                SetPlayerScore(plo, Level);
                }
            return 0x01;
            }
Reply
#4

Quote:
Originally Posted by Gabriel Duarte
Посмотреть сообщение
Tenta ai.
pawn Код:
if(strcmp(cmd, "/setlevel", true) == 0)
    {
            new string[128];
            new plo;
            new Level;
            new iddele;
            new giveplayername[MAX_PLAYER_NAME];
            new nomefoda [MAX_PLAYER_NAME];
            if(!IsPlayerAdmin(playerid))
            {
                SendClientMessage(playerid, COLOR_WHITE," Vocк nгo й Administrador!");
                return 0x01;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE,"Uso correto: /setlevel [id player] [level]");
                return 0x01;
            }
            iddele = strval(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE,"Uso correto: /setlevel [id player] [level]");
                return 0x01;
            }
            if(!IsPlayerConnected(iddele))
            {
                SendClientMessage(playerid, COLOR_WHITE,"Jogador estб OffLine");
                return 0x01;
            }
            Level = strval(tmp);
            if(iddele != INVALID_PLAYER_ID)
              {
                GetPlayerName(plo, giveplayername, sizeof(giveplayername));
                GetPlayerName(playerid, nomefoda, sizeof(nomefoda));
                format(string, sizeof(string), "Vocк setou o level do %s para %d ", giveplayername, Level);
                SendClientMessage(playerid, COLOR_WHITE, string);
                format(string, sizeof(string), "O administrador %s setou seu level para %d", nomefoda, Level);
                SendClientMessage(plo, COLOR_WHITE, string);
                SetPlayerScore(plo, Level);
                }
            return 0x01;
            }
Mesmo cуdigo que o meu maninho rs. Eu ja defini o NomeFoda como Variбvel global seu codigo ta fail '-'.


@Edit
Parece que o problema esta so com o ID 0, meu amigo testo e ele entro com ID 1 ai pra ele aparece que seto meu level direitinho, mas pra mim ainda apareceu que to setando meu proprio level ¬¬!
Reply
#5

nao ta igual o seu nao eu modifiquei tente usar ai.

Код:
 format(string, sizeof(string), "O administrador %s setou seu level para %d", nomefoda, Level);
                SendClientMessage(plo, COLOR_WHITE, string);
                SetPlayerScore(plo, Level);
Reply
#6

Isso nгo tem nada haver com oque eu quero, mas vlw a intenзгo
Reply
#7

mano tem sim vai mudar para quem vai mandar a msg.
Reply
#8

Nгo vai nгo, porque se vocк nгo reparou...

PHP код:
new iddele
PHP код:
iddele strval(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)) 
e nгo quero mudar pra quem vai envia a mensagem, isso ta normal, leia novamente o meu post la que vocк intendera
Reply
#9

com o code que eu passei funcionou aqui certinho essa msg para admin "Vocк setou o level do %s para %d "
e essa para quem eu setei: "O administrador %s setou seu level para %d" e o lvl foi setado.
Reply
#10

Quote:
Originally Posted by Gabriel Duarte
Посмотреть сообщение
com o code que eu passei funcionou aqui certinho essa msg para admin "Vocк setou o level do %s para %d "
e essa para quem eu setei: "O administrador %s setou seu level para %d" e o lvl foi setado.

Isso funciona, mas tenta fazer com um amigo vai aparecer na mensagem que vocк setou o SEU LEVEL mas o sistema seta o dele normal, o problema й na mensagem e sу acontece no ID 0 D:!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)