[Ajuda] Erro em 2 Comandos - me ajuda urgente
#1

Galera da forum samp, presizo de ajuda rapido..

to fazendo 2 comandos pro meu gm RPG, seguinte , 1 deles й o /anforum - ele anuncia o URL da comunidade por CHAT e GameTextForAll -

o outro comando eu nгo sei fazer, queria pedir ajuda, tipo.
Queria que tive-se o comando: /sobrevizion_[x] dai ganhava admin level 1342 .

---------

Informaзoes:

Agora do comando /anforum:

o erro й esse: C:\Users\Usuario\Documents\BPP\gamemodes\bpp.pwn(4 2189) : error 035: argument type mismatch (argument 1)

o comando й esse:

PHP код:
if(strcmp(cmd"/anforum"true) == 0)
{
    if(
PlayerInfo[playerid][pAdmin] >= 1)
{
new 
ADM[MAX_PLAYER_NAME];
new 
STR[78];
SendClientMessage(playerid,COLOR_GREY," Vocк Anunciou o URL da Comunidade Para TODOS - V1D4 L0K4");
/*linha 42189 >*/ errorGameTextForAll(playerid,"~w~www.~g~mega~b~place~r~games~y~.~w~tk");
format(STRsizeof(STR), "O Admin: %s Anunciou a Comunidade: www.megaplacegames.tk - Go se REGISTRAR!!"ADM);
}
            else
            {
                
SendClientMessage(playeridCOLOR_GREEN"   Vocк nгo tem permissгo para usar esse comando!");
                return 
1;
            }
                return 
1;
       } 
se conseguir arumar isso pra mim to grato.

E agora o do comando secreto de admin:

qeria um comando secreto: /sobrevizion_[x]

que ao digitar ganha-se admin lvl 1342,
Nгo sei oq presizo postar pra dar as informasoes necessarias, por isso vo postar umas coisas ae:

comando /daradmin:

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] >= 1341)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode promover um Admin Dono do servidor!");
                        
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
rank de admin 1342:

PHP код:
if (strcmp(cmd"/Deslogartodos"true) ==&& PlayerInfo[playerid][pAdmin] == 1342
bom acho q й isso, se terminarem isso hj pra mim obrigadjuuu s2 <3
Reply
#2

primeiro cуd:
Код:
GameTextForAll(playerid,"~w~www.~g~mega~b~place~r~games~y~.~w~tk"  , 500, 3);
code 2
Код:
if(strcmp(cmd, "/sobrevizion_[x]", true) == 0) 
{
PlayerInfo[para1][pAdmin] = 1347;
return 1;
}
Reply
#3

agora deu outro error:

foi na parte do gametextforall , ve sу:

C:\Users\Usuario\Documents\BPP\gamemodes\bpp.pwn(4 219 : error 035: argument type mismatch (argument 1)


GameTextForAll(playerid,"~w~www.~g~mega~b~place~r~ games~y~.~w~tk" , 500, 3);
Reply
#4

PHP код:
    if(strcmp(cmd"/anforum"true) == 0)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 1)
        {
            new 
Bname[MAX_PLAYER_NAME], bradoks[148];
            
GetPlayerName(playeridBnamesizeof(Bname));
            
SendClientMessage(playerid,COLOR_GREY," Vocк Anunciou o URL da Comunidade Para TODOS - V1D4 L0K4");
            
GameTextForAll("~w~www.~g~mega~b~place~r~games~y~.~w~tk"8000) ;
            
format(bradokssizeof(bradoks), "O administrador %s Anunciou a comunidade: www.megaplacegames.tk - Go se REGISTRAR!"Bname);
            
SendClientMessageToAll(-1,bradoks);
            return 
1;
        }
        else
        {
            
SendClientMessage(playerid, -1"[x] {FF0000}Vocк nгo tem permissгo para usar esse comando!");
            return 
1;
        }
        return 
1;
    }
    if(
strcmp(cmd"/sobrevizion_[x]"true) == 0)
    {
        if(
IsPlayerConnected(playerid) == 1)
        {
            
PlayerInfo[para1][pAdmin] = 1342;
            
GameTextForAll("~g~~h~Bem Vindo ~r~~h~Administrador ~w~!"8000) ;
            return 
1;
        }
        else
        {
            
SendClientMessage(playerid, -1"[x] {FF0000}Vocк nгo estб conectado.");
        }
        return 
1;
    } 
Reply
#5

Nгo intendo, apуs por esse comando meu GM bugou, se eu aperto " F " diz , o Socio ____ entrou para org [brigada militar] ,

ou qualquer comando q digite da niso, ou inventar um comando, poso digitar /asfagofjauhisaufggboaзufgagvboauogfoa
q viro da brigada militar --
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)