[Ajuda]Comandos Invalidos
#1

Olб Galera, to com um probleminha aqui... Tipo eu digito o comando certo (/rank) e no serve aparece como se estivesse errado -.-' (Este Comando nгo Existe).

pawn Код:
if(!strcmp(cmdtext, "/rank", true))
    {
        new
            Scor[MAX_PLAYERS],
            string[128],
            Nome[24]
        ;

        for(new i; i != MAX_PLAYERS; ++i) Scor[i] = GetPlayerScore(i);

        BubbleSort(Scor, sizeof(Scor));

        for(new i; i != 10; i++)
        {
            GetPlayerName(playerid, Nome, 24);
            format(string, sizeof(string),"NЄ %i Nome: %s Level: %d", i+1, Nome, Scor[i]);
            SendClientMessage(playerid, -1, string);
        }
        return 1;
    }
jб tentei outros comandos e alguns da o mesmo problema, os ъnicos que estгo funcionando й de um FS de ADM e o comando /handsup

pawn Код:
if(!strcmp(cmd, "/handsup", true))
    {
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
        return 1;
    }
ME AJUDEM PF !!!
Reply
#2

Tente Este:
pawn Код:
if(!strcmp(cmdtext, "/rank", true))
{
new
Scor[MAX_PLAYERS],
string[128],
Nome[24]
;
for(new i; i != MAX_PLAYERS; ++i) Scor[i] = GetPlayerScore(i);
BubbleSort(Scor, sizeof(Scor));
for(new i; i != 10; i++)
{
GetPlayerName(playerid, Nome, 24);
format(string, sizeof(string),"NЄ %i Nome: %s Level: %d", i+1, Nome, Scor[i]);
SendClientMessage(playerid, -1, string);
}
return 1;
}
Reply
#3

Quote:
Originally Posted by GuiihCamargo
Посмотреть сообщение
Tente Este:
if(!strcmp(cmdtext, "/rank", true))
{
new
Scor[MAX_PLAYERS],
string[128],
Nome[24]
;
for(new i; i != MAX_PLAYERS; ++i) Scor[i] = GetPlayerScore(i);
BubbleSort(Scor, sizeof(Scor));
for(new i; i != 10; i++)
{
GetPlayerName(playerid, Nome, 24);
format(string, sizeof(string),"NЄ %i Nome: %s Level: %d", i+1, Nome, Scor[i]);
SendClientMessage(playerid, -1, string);
}
return 1;
}[/pawn]
Oque vocк mudou?

Tenta assim:
PHP код:
if(!strcmp("/rank"cmdtexttrue))

new 
Scor[MAX_PLAYERS], 
string[128], 
Nome[24

for(new 
i!= MAX_PLAYERS; ++iScor[i] = GetPlayerScore(i); 
BubbleSort(Scorsizeof(Scor)); 
for(new 
i!= 10i++) 

GetPlayerName(playeridNome24); 
format(stringsizeof(string),"NЄ %i Nome: %s Level: %d"i+1NomeScor[i]); 
SendClientMessage(playerid, -1string); 

return 
1

Reply
#4

Quote:
Originally Posted by Đeagle
Посмотреть сообщение
Oque vocк mudou?
Eu mudei o jeito de ele por, pra conseguir pegar o comando
Reply
#5

jah tentei o comando de vcs 2 e continuo mesma coisa =X

edit__

ta valendo +rep =D (se q alguns nem ligam mais й o mбximo que posso agradecer)
Reply
#6

Olha, eu ainda sou novato em pawn, mais tenta assim

PHP код:
if(!strcmp("/rank"cmdtexttrue))

new 
Scor[MAX_PLAYERS], 
new 
string[128], 
new 
Nome[24

for(new 
i!= MAX_PLAYERS; ++iScor[i] = GetPlayerScore(i); 
BubbleSort(Scorsizeof(Scor)); 
for(new 
i!= 10i++) 

GetPlayerName(playeridNome24); 
format(stringsizeof(string),"NЄ %i Nome: %s Level: %d"i+1NomeScor[i]); 
SendClientMessage(playerid, -1string); 

return 
1

Reply
#7

Pelo que li, seu comando estava jб programado para mostrar invalido quando vocк pediu que ele verificasse a existкncia dele antes de cria-lo. Posso estar falando besteira, mas acho que era o if(!strcmp(...
Testa oque eu coloquei ai... Talvez dк certo.

pawn Код:
if(strcmp("/rank", cmdtext, true))
{  
new  
Scor[MAX_PLAYERS],  
string[128],  
Nome[24]  
;  
for(new i; i != MAX_PLAYERS; ++i) Scor[i] = GetPlayerScore(i);  
BubbleSort(Scor, sizeof(Scor));  
for(new i; i != 10; i++)  
{  
GetPlayerName(playerid, Nome, 24);  
format(string, sizeof(string),"NЄ %i Nome: %s Level: %d", i+1, Nome, Scor[i]);  
SendClientMessage(playerid, -1, string);  
}  
return 1;  
}
Reply
#8

Quote:
Originally Posted by Edu_Oliveira
Посмотреть сообщение
Pelo que li, seu comando estava jб programado para mostrar invalido quando vocк pediu que ele verificasse a existкncia dele antes de cria-lo. Posso estar falando besteira, mas acho que era o if(!strcmp(...
Testa oque eu coloquei ai... Talvez dк certo.

pawn Код:
if(strcmp("/rank", cmdtext, true))
{  
new  
Scor[MAX_PLAYERS],  
string[128],  
Nome[24]  
;  
for(new i; i != MAX_PLAYERS; ++i) Scor[i] = GetPlayerScore(i);  
BubbleSort(Scor, sizeof(Scor));  
for(new i; i != 10; i++)  
{  
GetPlayerName(playerid, Nome, 24);  
format(string, sizeof(string),"NЄ %i Nome: %s Level: %d", i+1, Nome, Scor[i]);  
SendClientMessage(playerid, -1, string);  
}  
return 1;  
}
so tirar o "!" neh

edit____ tirei o "!" e fico mesma coisa, se n me engano foi a primeira coisa q tentei =X

e tbm jah tentei ctrl + c ctrl + v no seu codigo e nada tbm
Reply
#9

Sim... O ! serve para verificar a existencia. Ele chama a existencia do que vocк coloca a frente, e se nгo existe, ele anula. Ali o GM estб parando de verificar antes de executar o comando, pois vocк esta buscando algo que nгo existe.
Reply
#10

Quote:
Originally Posted by guizaofb
Посмотреть сообщение
so tirar o "!" neh

edit____ tirei o "!" e fico mesma coisa, se n me engano foi a primeira coisa q tentei =X

e tbm jah tentei ctrl + c ctrl + v no seu codigo e nada tbm
como disse acima entгo "tirei o "!" e fico mesma coisa, se n me engano foi a primeira coisa q tentei =X

e tbm jah tentei ctrl + c ctrl + v no seu codigo e nada tbm"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)