[Ajuda] error 029: invalid expression, assumed zero
#1

Alguйm poderia me ajudar ? й um sistema fбcil mais estou com um erro bobo gostaria que quando o admin der /afk aparece AUSENTE no /admins dele mais acho que to fazendo alguma coisa errada.

Esse й o comando /afk
PHP код:
CMD:afk(playeridparams[])
    {
        new 
string[128];
        if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pAdminTemp] >= 1)
        {
            if(
admafk[playerid] > 0)
            {
                
admafk[playerid] = 0;
                
SendClientMessage(playeridCOLOR_LIGHTRED"Vocк acaba de sair do modo AFK !");
                
format(string128" AdmCmd: O admin %s saiu do modo {00FF00}AFK",sendernameplayerid);
                 
ABroadCast(COLOR_GRAD1,string,1);
                
BPSLogs("adminsafk"string);
                }
                else
                {
                
admafk[playerid] = 1;
                
SendClientMessage(playeridCOLOR_LIGHTRED"Vocк acaba de entrar no modo AFK !");
                
format(string128" AdmCmd: O admin %s entrou em modo {FF0000}AFK",sendernameplayerid);
                
ABroadCast(COLOR_GRAD1,string,1);
                   }
               }
        } 
Esse й o comando /admins
PHP код:
CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    new 
string[128];
                    if(
admtrampando[i] == || admafk[i] == 1)
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s][JOGANDO]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    if else
                    {
                        
format(string128"Admin: %s Nнvel: [%s] {FF0000}(AUSENTE)"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Reply
#2

Quote:
Originally Posted by fsDaley
Посмотреть сообщение
Alguйm poderia me ajudar ? й um sistema fбcil mais estou com um erro bobo gostaria que quando o admin der /afk aparece AUSENTE no /admins dele mais acho que to fazendo alguma coisa errada.

Esse й o comando /afk
PHP код:
CMD:afk(playeridparams[])
    {
        new 
string[128];
        if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pAdminTemp] >= 1)
        {
            if(
admafk[playerid] > 0)
            {
                
admafk[playerid] = 0;
                
SendClientMessage(playeridCOLOR_LIGHTRED"Vocк acaba de sair do modo AFK !");
                
format(string128" AdmCmd: O admin %s saiu do modo {00FF00}AFK",sendernameplayerid);
                 
ABroadCast(COLOR_GRAD1,string,1);
                
BPSLogs("adminsafk"string);
                }
                else
                {
                
admafk[playerid] = 1;
                
SendClientMessage(playeridCOLOR_LIGHTRED"Vocк acaba de entrar no modo AFK !");
                
format(string128" AdmCmd: O admin %s entrou em modo {FF0000}AFK",sendernameplayerid);
                
ABroadCast(COLOR_GRAD1,string,1);
                   }
               }
        } 
Esse й o comando /admins
PHP код:
CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    new 
string[128];
                    if(
admtrampando[i] == || admafk[i] == 1)
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s][JOGANDO]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    if else
                    {
                        
format(string128"Admin: %s Nнvel: [%s] {FF0000}(AUSENTE)"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Tente Assim:

Quote:
PHP код:
CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    new 
string[128];
                    if(
admtrampando[i] == || admafk[i] == 1)
                    {
                        
format(string128"Admin: %s Nнvel: [%s][JOGANDO]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s] {FF0000}(AUSENTE)"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Reply
#3

Quote:
Originally Posted by Gleidson
Посмотреть сообщение
Tente Assim:
Nгo deu, agora quando eu dou /admins nгo aparece nenhum admin, agora quando eu dou /jogar, aparece no /admins
Reply
#4

Quote:
Originally Posted by fsDaley
Посмотреть сообщение
Nгo deu, agora quando eu dou /admins nгo aparece nenhum admin, agora quando eu dou /jogar, aparece no /admins
Mande Seu Codigo Completo Ou Mim Adiciona No Skype "********:gleidson.pivete"
Reply
#5

Me passe seu skype por favor.
Reply
#6

Quote:
Originally Posted by fsDaley
Посмотреть сообщение
Me passe seu skype por favor.
********:gleidson.pivete
Reply
#7

Arrumei o erro que eu tinha, mais eu tenho mais uma dъvida, quando eu dou /jogar, aparece duas vezes o meu nick, sem o JOGANDO e com o JOGANDO, e o afk estб normal, alguйm poderia me ajudar ?



comando /jogar
PHP код:
CMD:jogar(playeridparams[])
    {
        if(
PlayerInfo[playerid][pJailed] != 0)
        {
            
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode trabalhar na cadeia!");
              return 
true;
        }
        new 
string[128];
        if(
gettime() < AdmHelperComido[playerid] && PlayerInfo[playerid][pAdmin] < 5000)
        {
            
format(string,sizeof(string),"Vocк nгo pode usar este comando com tanta Frequencia! espere %d segundos"AdmHelperComido[playerid]-gettime());
            
SendClientMessage(playeridCOLOR_GRAD1string);
            return 
true;
        }
        if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pAdminTemp] >= 1)
        {
            if(
admtrampando[playerid] > 0)
            {
                if(
PlayerInfo[playerid][pAdminTemp] == 1)
                {
                    
SendClientMessage(playerid,COLOR_GRAD1,"Apenas administradores fixos podem jogar !");
                      return 
true;
                }
                if(
CountAdminTrampo() < && PlayerInfo[playerid][pAdmin] < 5000)
                    return 
SendClientMessage(playeridCOLOR_GREY"  Deve ter no mнnimo 1 admin em modo trabalho para vocк poder entrar em modo jogo!");
                
admtrampando[playerid] = 0;
                
AdmHelperComido[playerid] = gettime()+60;
                
GetPlayerName(playerid,sendername,sizeof(sendername));
                
format(string128" AdmCmd: O admin %s entrou em modo Jogo, e seus comandos foram retirados!",sendernameplayerid);
                
ABroadCast(COLOR_LIGHTGREEN,string,1);
                
SetPlayerToTeamColor(playerid);
                
SetPlayerArmour(playerid0.0);
                
SetPlayerHealth(playerid100);
                
KillTimer(TempoAdministrador);
                
format(stringsizeof(string), "%s esta jogando"PlayerName(playerid));
                
BPSLogs("admin"string);
                
SetPlayerSkin(playeridPlayerInfo[playerid][pSkin]);
                
updatetextlife(playerid);
            }
            else
            {
                
admtrampando[playerid] = 1;
                
AdmHelperComido[playerid] = gettime()+60;
                
GetPlayerName(playerid,sendername,sizeof(sendername));
                
format(string128" AdmCmd: O admin %s saiu de modo jogo, e seus comandos foram devolvidos!",sendernameplayerid);
                 
ABroadCast(COLOR_LIGHTGREEN,string,1);
                   
SetPlayerToTeamColor(playerid);
                   
ResetPlayerWeapons(playerid);
                   
SetPlayerArmour(playerid0.0);
                
SetPlayerHealth(playerid99999);
                
format(stringsizeof(string), "%s esta trabalhando"PlayerName(playerid));
                
TempoAdministrador SetTimerEx("Administrador"100true"i"playerid);
                
BPSLogs("admin"string);
                
updatetextlife(playerid);
           }
        }
        else 
SendClientMessage(playeridCOLOR_GRAD1" Vocк nгo pode usar este comando !");
        return 
true;
    } 
Comando /admins
PHP код:
CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    new 
string[128];
                    if(
admafk[i] == 0)
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s] {FF0000}(AUSENTE)"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                      }
                    if(
admtrampando[i] == 0)
                    {
                        
format(string128"Admin: %s Nнvel: [%s][JOGANDO]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Comando /afk
PHP код:
CMD:afk(playeridparams[]) 
    { 
        new 
string[128]; 
        if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pAdminTemp] >= 1
        { 
            if(
admafk[playerid] > 0
            { 
                
admafk[playerid] = 0
                
SendClientMessage(playeridCOLOR_LIGHTRED"Vocк acaba de sair do modo AFK !"); 
                
format(string128" AdmCmd: O admin %s saiu do modo {00FF00}AFK",sendernameplayerid); 
                 
ABroadCast(COLOR_GRAD1,string,1); 
                
BPSLogs("adminsafk"string); 
                } 
                else 
                { 
                
admafk[playerid] = 1
                
SendClientMessage(playeridCOLOR_LIGHTRED"Vocк acaba de entrar no modo AFK !"); 
                
format(string128" AdmCmd: O admin %s entrou em modo {FF0000}AFK",sendernameplayerid); 
                
ABroadCast(COLOR_GRAD1,string,1); 
                   } 
               } 
        } 
poderiam me ajudar?
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=281631

aqui uso esse e tem todas essaz funзгo do seu.
Reply
#9

Quote:
Originally Posted by GuilhermeNunes
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=281631

aqui uso esse e tem todas essaz funзгo do seu.
Mais eu gostaria implantar esse sistema jб no meu, poderia me ajudar ?
Reply
#10

Quote:
Originally Posted by fsDaley
Посмотреть сообщение
Mais eu gostaria implantar esse sistema jб no meu, poderia me ajudar ?
Mais o que te mandei ja tem os

- /trabalhar
- /jogar
- /afk
- /sairafk
entre outros...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)