[AJUDA] Passar estes 2 comandos para Zcmd sscanf2
#1

Bom to trabalhando com gf, mas nгo gosto de usar strcmp entao vou comeзar a usar zcmd e sscanf2..
Alguem pode passar estes comandos para zcmd e sscanf2?

PHP код:
    if(!strcmp(cmd"/logar"true))
    {
        if(
IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
        {
            new 
tmppass[64];
            if(
Logado[playerid] == 1)
            {
                
SendClientMessage(playeridCOLOR_GREY" Vocк jб estб logado.");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCINZA1"USE: /logar [Senha]");
                return 
1;
            }
            
strmid(tmppasstmp0strlen(cmdtext), 255);
            
LogarPlayer(playerid,tmppass);
        }
        return 
1;
    }
    if(!
strcmp(cmd"/registrar"true))
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
Logado[playerid] == 1)
            {
                
SendClientMessage(playeridCOLOR_GREY" Vocк jб estб logado.");
                return 
1;
            }
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(string64"Players/%s.ini"sendername);
            new 
FilehFile fopen(stringio_read);
            if (
hFile)
            {
                
SendClientMessage(playeridAMARELO"Este Nick jб existe, use outro.");
                
fclose(hFile);
                return 
1;
            }
            new 
tmppass[64];
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCINZA1"USE: /registrar [Senha]");
                
SendClientMessage(playeridAMARELO"-==> Use Nome_Sobrenome ( Ex: Guru_Josh ) <==-");
                return 
1;
            }
            
strmid(tmppasstmp0strlen(cmdtext), 255);
            
RegistrarPlayer(playerid,tmppass);
        }
        return 
1;
    } 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)