[Ajuda] /limpar adm nгo limpa
#1

Gente estou precisando de ajuda urgente no /limparadm que so limpa a lista de adm, e nгo tira o adm do player so remove da lista de adm como arrumo isso ?

Comando de /daradm

PHP код:
    if(strcmp(cmd"/daradmin"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 1342)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo tem autorizaзгo para usar esse comando.");
                return 
1;
            }
            
AdmsVaga();
            if(
VagaSobrando == 0)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Nгo hб mais vagas na lista use /limparadm primeiro.");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /daradmin [id] [Nivel]");
                return 
1;
            }
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /daradmin [id] [Nivel]");
                return 
1;
            }
            
level strval(tmp);
            if(
level == 0)
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /limparadmin para limpar uma vaga");
                return 
1;
            }
            
GetPlayerName(para1giveplayersizeof(giveplayer));
            
GetPlayerName(playeridsendernamesizeof(sendername));
            if(
IsPlayerConnected(para1))
            {
                if(
para1 != INVALID_PLAYER_ID)
                {
                    if(
PlayerInfo[para1][pAdmin] >= 1342)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode promover um Admin Dono/Scripter!");
                        
format(stringsizeof(string), "O admin %s tentou te promover a nivel %d",sendername ,level);
                        
SendClientMessage(para1COLOR_AZULBBstring);
                        return 
1;
                    }
                    
format(stringsizeof(string), "   Vocк foi promovido para level  %d de Admin - Por %s"levelsendername);
                    
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                    
format(stringsizeof(string), "   Vocк promoveu o(a) %s Para o level %d de Admin."giveplayer,level);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
getdate(yearmonthday);
                    
gettime(hour,minute,second);
                    
format(stringsizeof(string), "%s deu admin nivel %d para %s [%d/%d/%d] бs [%d:%d:%d]."sendernamelevelgiveplayerday,
                    
monthyearhourminutesecond);
                    
PAdminsLog(string);
                    for(new 
0sizeof(AdmInfo); i++)
                    {
                        if(
PlayerInfo[para1][pAdmin] > 0)
                        {
                            
PlayerInfo[para1][pAdmin] = level;
                            break;
                        }
                           else if(
AdmInfo[i][AdminVaga] == 0)
                        {
                            
PlayerInfo[para1][pAdmin] = level;
                            
AdmInfo[i][gMembro] = giveplayer;
                            
AdmInfo[i][AdminVaga] = 1;
                            
SaveAdm();
                            break;
                        }
                    }
                }
            }
        }
        return 
1;
    } 
Comando de /limparadm

PHP код:
    if (strcmp("/limparadm"cmdtexttrue10) == || strcmp("/limparadmin"cmdtexttrue10) == 0)
    {
        if(
PlayerInfo[playerid][pAdmin] < 1342)
        {
            
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo estб autorizado a usar este comando!");
            return 
1;
        }
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp))
        {
            
SendClientMessage(playeridCOLOR_GRAD2"USE: /limparadm [ Vaga ]");
            return 
1;
        }
        new 
Vagao strval(tmp);
        if(
Vagao || Vagao 30) { SendClientMessage(playeridCOLOR_GREY"Vaga mнnima 1 mбximo 30!"); return 1; }
        
getdate(yearmonthday);
        
gettime(hour,minute,second);
        
format(stringsizeof(string), "%s apagou a vaga %d de %s [%d/%d/%d] бs [%d:%d:%d]."PlayerName(playerid), VagaoAdmInfo[Vagao][gMembro], day,
        
monthyearhourminutesecond);
        
PAdminsLog(string);
        
strmid(AdmInfo[Vagao][gMembro], "Vazio"0strlen("Vazio"), 255);
        
AdmInfo[Vagao][AdminVaga] = 0;
        
SaveAdm();
        
format(stringsizeof(string), "Vocк Limpou A Vaga Nє %d",Vagao);
        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
        return 
1;
    } 
Reply
#2

Posta o salvamento de admin.

@off.
Gamemode do seu server й um lixo.
Reply
#3

poblema e meu estou aqui pedindo ajuda se vocк nгo quer ajudar entгo nгo precisa nem postar nada seu lixo
Reply
#4

alguem me ajuda ?
Reply
#5

Quote:
Originally Posted by felipe_mr
Посмотреть сообщение
poblema e meu estou aqui pedindo ajuda se vocк nгo quer ajudar entгo nгo precisa nem postar nada seu lixo
Eu pedi para postar o sistema de salvamento de admin para eu arrumar, so chamei seu server de lixo por que odeio servidor com gm edit.
Reply
#6

E eu odeio gente snob que nгo sabe usar seu talento para ajudar e sim reclamar ou humilhar
Reply
#7

Quote:
Originally Posted by felipe_mr
Посмотреть сообщение
E eu odeio gente snob que nгo sabe usar seu talento para ajudar e sim reclamar ou humilhar
Da para postar o sistema de salvamento de admin para que eu possa lhe ajudar? serб que vocк nгo ler onde eu peзo isso?
Reply
#8

PHP код:
enum Admin
{
    
gMembro[MAX_PLAYER_NAME],
    
AdminVaga,
};
new 
AdmInfo[31][Admin];
forward AdmCheck(playerid);
forward AdmsVaga();
public 
AdmCheck(playerid)
{
    new 
idx 0;
    while(
idx sizeof(AdmInfo))
    {
        if(
strcmp(AdmInfo[idx][gMembro],PlayerName(playerid), true ) == )
        {
            return 
1;
        }
        
idx++;
    }
    return 
0;
}
public 
AdmsVaga()
{
    new 
storedcopname[64];
    new 
Filefile fopen("Configs/Admins.cfg"io_read);
    if (
file)
    {
        new 
valtmp[MAX_PLAYER_NAME];
        while (
fread(filevaltmp) > 0)
        {
            
strmid(storedcopnamevaltmp0strlen("Vazio"), 255);
            if ((
strcmp(storedcopname"Vazio"truestrlen("Vazio")) == 0) && (strlen("Vazio") == strlen(storedcopname)))
            {
                
fclose(file);
                
VagaSobrando 1;
                return 
1;
            }
        }
    }
    
fclose(file);
    
VagaSobrando 0;
    return 
0;
}
forward LoadAdm();
forward SaveAdm();
public 
SaveAdm()
{
    new 
idx;
    new 
Filefile2;
    while (
idx sizeof(AdmInfo))
    {
        new 
coordsstring[256];
        
format(coordsstringsizeof(coordsstring), "%s,%d\n",AdmInfo[idx][gMembro],AdmInfo[idx][AdminVaga]);
        if(
idx == 0)
        {
            
file2 fopen("Configs/Admins.cfg"io_write);
        }
        else
        {
            
file2 fopen("Configs/Admins.cfg"io_append);
        }
        
fwrite(file2coordsstring);
        
idx++;
        
fclose(file2);
    }
    return 
1;
}

public 
LoadAdm()
{
    new 
arrCoords[2][64];
    new 
strFromFile2[256];
    new 
Filefile fopen("Configs/Admins.cfg"io_read);
    if (
file)
    {
        new 
idx 0;
        while(
idx sizeof(AdmInfo))
        {
            
fread(filestrFromFile2);
            
split(strFromFile2arrCoords',');
            
strmid(AdmInfo[idx][gMembro], arrCoords[0], 0strlen(arrCoords[0]), 255);
            
AdmInfo[idx][AdminVaga] = strval(arrCoords[1]);
            
idx++;
        }
    }
    
fclose(file);
    return 
1;

Reply
#9

A LoadAdmin estб sendo chamada?
Se Sim, cheque se em OnPlayerConnect tem: PlayerInfo[playerid][pAdmin] = 0; se nгo tiver coloque.
Reply
#10

Cara pf Agora traduza pq eu n entendi nada
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)