[Ajuda] Ver Ultimo Login
#1

Criei este Comando do zero, ta mostrando direitinho sу que so ta amostrando o meu ultimo login quando digito o nome de um player da "SERVER: Unknown Command", ajuda com ele ai.

Quote:

if(strcmp(cmd,"/ultimologin",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 3000)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб em modo Admin USE: /jogar");
return true;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"USE: /ultimologin [NOME_SOBRENOME]");
return true;
}
new stringul[64];
format(stringul, sizeof(stringul), "Contas/%s.ini", tmp);
if(!DOF2_FileExists(stringul))
{
SendClientMessage(playerid,COLOR_GRAD1,"Este Nick nгo existe no servidor, digite um nome correto EX: Nome_Sobrenome");
return true;
}

new Info[6][24];
new arquivo[64];
giveplayerid = ReturnUser(tmp);
GetPlayerName(playerid, PlayerNome, sizeof(PlayerNome));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
split(PlayerInfo[giveplayerid][pLastLogin],Info,'/');
format(arquivo, sizeof(arquivo), "Contas/%s.ini", OpenAccPlayer, tmp);
format(string,sizeof(string), " %s - Ъltimo Login: [%d/%d/%d - %d:%d:%d]", tmp, strval(Info[0]),strval(Info[1]),strval(Info[2]),strval(Info[3]),strval(Info[4]),strval(Info[5]));
ABroadCast(COLOR_YELLOW,string,1);
return true;

}
return 1;
}

Reply
#2

Alguem?
Ajuda ai com esse cmd por favor..
Reply
#3

Estб usando a include "zcmd" ?
Reply
#4

Nгo, strcmp, Ajuda ai com esse comando na moral.
Reply
#5

Tente.
PHP код:
    if(strcmp(cmd,"/ultimologin",true)==0){
       if(
PlayerInfo[playerid][pAdmin] >= 3000){
           if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != DONO){
               
SendClientMessage(playeridCOLOR_GRAD1" Vocк nгo estб em modo Admin USE: /jogar");
               return 
true;
       }
       
tmp strtok(cmdtext,idx);
       if(!
strlen(tmp)){
           
SendClientMessage(playerid,COLOR_GRAD1,"USE: /ultimologin [NOME_SOBRENOME]");
           return 
true;
       }
       new 
stringul[64];
       
format(stringulsizeof(stringul), "Contas/%s.ini"tmp);
       if(!
DOF2_FileExists(stringul))
       {
           
SendClientMessage(playerid,COLOR_GRAD1,"Este Nick nгo existe no servidor, digite um nome correto EX: Nome_Sobrenome");
           return 
true;
       }
       
       new 
Info][ 24 ],arquivo64 ];
       
       
giveplayerid ReturnUsertmp );
       
GetPlayerName(playeridPlayerNomesizeof(PlayerNome));
       
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
       
split(PlayerInfo[giveplayerid][pLastLogin],Info,'/');
       
format(arquivosizeof(arquivo), "Contas/%s.ini"OpenAccPlayertmp);
       
format(string,sizeof(string), " %s - Ъltimo Login: [%d/%d/%d - %d:%d:%d]"tmpstrval(Info[0]),strval(Info[1]),strval(Info[2]),strval(Info[3]),strval(Info[4]),strval(Info[5]));
       
ABroadCast(COLOR_YELLOW,string,1);
       return 
true;
    } 
Reply
#6

Por que nгo faz o comando usando sscanf?
Reply
#7

Porque ele nгo quer, ou nгo sabia que existia ou oque й sscanf...
Reply
#8

Dando varios erros ( 26 ), no compilador mostra erros com nomes de outras coisas do GM, mas quando retiro o code e compilo vai normal.
Reply
#9

Geralmente 26 e quando ta faltando uma chave... e vendo meio por cima o cуdigo que o iTakelot postou ta faltando fechar uma chave...
Reply
#10

Continua dando "SERVER: Unknown Command" quando digito o nome de um player sem ser eu.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)