[AJUDA]Erro rank[playerid]
#5

Quote:
Originally Posted by Sergio_MOW
Посмотреть сообщение
Hm, ja sei qual erro, se ngm responder aqui posto dps e edito q agr vo pra aula flw
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk sу pra aumentar post kkkkk euri com essa desculpa

#TOPIC

Pronto, ajeitei o codigo:

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == )
    {
        if(!
response)
        {
            
ShowPlayerDialog(playerid2DIALOG_STYLE_LIST"Pick Your Class""Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander\nAdmin""Select""Cancel");
            
TogglePlayerControllable(playerid0);
        }
        if(
response)
        {
            if(
listitem == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"You chose the assault as your class.");
                
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                
gPlayerClass[playerid] = ASSAULT;
                
PickedClass[playerid] = 1;
                
SetPlayerVirtualWorld(playerid0);
                
TogglePlayerControllable(playerid1);
                if(
gTeam[playerid] == TEAM_USA)
                {
                    
GivePlayerWeapon(playerid24200);
                    
GivePlayerWeapon(playerid31500);
                    
GivePlayerWeapon(playerid25100);
                    
SetPlayerSkin(playerid287);
                }
                else if(
gTeam[playerid] == TEAM_GERMANY)
                {
                    
GivePlayerWeapon(playerid24200);
                    
GivePlayerWeapon(playerid31500);
                    
GivePlayerWeapon(playerid25100);
                    
SetPlayerSkin(playerid285);
                }
                else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid24200);
                }
            }
            if(
listitem == 1)
            {
                if( 
rank[playerid] >= )
                {
                    
SendClientMessage(playeridCOLOR_GREY"You chose the demolition as your class.");
                    
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                    
gPlayerClass[playerid] = DEMOLITION;
                    
PickedClass[playerid] = 1;
                    
SetPlayerVirtualWorld(playerid0);
                    
TogglePlayerControllable(playerid1);
                    if(
gTeam[playerid] == TEAM_USA)
                    {
                        
GivePlayerWeapon(playerid1650);
                        
GivePlayerWeapon(playerid365);
                        
GivePlayerWeapon(playerid24200);
                        
SetPlayerSkin(playerid73);
                    }
                    else if(
gTeam[playerid] == TEAM_GERMANY)
                    {
                        
GivePlayerWeapon(playerid1650);
                        
GivePlayerWeapon(playerid365);
                        
GivePlayerWeapon(playerid24200);
                        
SetPlayerSkin(playerid27);
                    }
                    else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                    {
                        
GivePlayerWeapon(playerid34200);
                        
GivePlayerWeapon(playerid11);
                        
GivePlayerWeapon(playerid24200);
                    }
                }
                else
                {
                    
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Pick Your Class""Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander""Select""Cancel");
                    
TogglePlayerControllable(playerid0);
                    
SendClientMessage(playeridCOLOR_RED"You need to be rank 1 to be able to use Demolition !");
                }
            }
            if(
listitem == 2)
            {
                
SendClientMessage(playeridCOLOR_GREY"You chose the sniper as your class.");
                
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                
gPlayerClass[playerid] = SNIPER;
                
PickedClass[playerid] = 1;
                
SetPlayerVirtualWorld(playerid0);
                
TogglePlayerControllable(playerid1);
                if(
gTeam[playerid] == TEAM_USA)
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid24200);
                    
SetPlayerSkin(playerid124);
                }
                else if(
gTeam[playerid] == TEAM_GERMANY)
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid24200);
                    
SetPlayerSkin(playerid206);
                }
                else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid24200);
                }
            }
            if(
listitem == 3)
            {
                if(
gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA)
                {
                    
SendClientMessage(playeridCOLOR_GREY"You cant be a pilot on russia or japan!");
                    
TogglePlayerControllable(playerid1);
                    return 
1;
                }
                if(
rank[playerid] >= 13)
                {
                    
SendClientMessage(playeridCOLOR_GREY"You chose the pilot as your class.");
                    
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                    
gPlayerClass[playerid] = PILOT;
                    
PickedClass[playerid] = 1;
                    
SetPlayerVirtualWorld(playerid0);
                    
TogglePlayerControllable(playerid1);
                    if(
gTeam[playerid] == TEAM_USA)
                    {
                        
SetPlayerSkin(playerid163);
                        
GivePlayerWeapon(playerid2250);
                    }
                    if(
gTeam[playerid] == TEAM_GERMANY)
                    {
                        
SetPlayerSkin(playerid284);
                        
GivePlayerWeapon(playerid2250);
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"You have to have atleast rank 3 to be a pilot!");
                    
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Pick Your Class""Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander""Select""Cancel");
                    
TogglePlayerControllable(playerid0);
                }
            }
        }
        if(
listitem == 4)
        {
            
SendClientMessage(playeridCOLOR_GREY"You chose the medic as your class.");
            
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
            
gPlayerClass[playerid] = MEDIC;
            
PickedClass[playerid] = 1;
            
SetPlayerVirtualWorld(playerid0);
            
TogglePlayerControllable(playerid1);
            if(
gTeam[playerid] == TEAM_USA)
            {
                
SetPlayerSkin(playerid275);
                
GivePlayerWeapon(playerid23200);
                
GivePlayerWeapon(playerid11);
                
SetPlayerSkin(playerid275);
            }
            else if(
gTeam[playerid] == TEAM_GERMANY)
            {
                
SetPlayerSkin(playerid70);
                
GivePlayerWeapon(playerid11);
                
GivePlayerWeapon(playerid23200);
                
SetPlayerSkin(playerid70);
            }
            else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
            {
                
GivePlayerWeapon(playerid34200);
                
GivePlayerWeapon(playerid11);
                
GivePlayerWeapon(playerid24200);
            }
        }
        if(
listitem == 5)
        {
            
SendClientMessage(playeridCOLOR_GREY"You chose the engineer as your class.");
            
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
            
gPlayerClass[playerid] = ENGINEER;
            
PickedClass[playerid] = 1;
            
SetPlayerVirtualWorld(playerid0);
            
TogglePlayerControllable(playerid1);
            if(
gTeam[playerid] == TEAM_USA)
            {
                
SetPlayerSkin(playerid179);
                
GivePlayerWeapon(playerid27200);
                
GivePlayerWeapon(playerid11);
                
GivePlayerWeapon(playerid29200);
            }
            else
            if(
gTeam[playerid] == TEAM_GERMANY) {
                
SetPlayerSkin(playerid50);
                
GivePlayerWeapon(playerid27200);
                
GivePlayerWeapon(playerid11);
                
GivePlayerWeapon(playerid29200);
            }
            else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
                
GivePlayerWeapon(playerid34200);
                
GivePlayerWeapon(playerid11);
                
GivePlayerWeapon(playerid24200);
            }
        }
        if( 
listitem == )
        {                     
//pyro
            
if( rank[playerid] >= )
            {
                
SendClientMessage(playeridCOLOR_GREY"You chose the pyroman as your class.");
                
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                
gPlayerClass[playerid] = PYRO;
                
PickedClass[playerid] = 1;
                
SetPlayerVirtualWorld(playerid0);
                
TogglePlayerControllable(playerid1);
                if(
gTeam[playerid] == TEAM_USA)
                {
                    
SetPlayerSkin(playerid279);
                    
GivePlayerWeapon(playerid1620);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid23200);
                    
GivePlayerWeapon(playerid37550);
                }
                else if(
gTeam[playerid] == TEAM_GERMANY)
                {
                    
SetPlayerSkin(playerid278);
                    
GivePlayerWeapon(playerid1620);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid23200);
                    
GivePlayerWeapon(playerid37250);
                }
                else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid24200);
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"You have to have atleast rank 4 to be a pyroman!");
                
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Pick Your Class""Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander""Select""Cancel");
                
TogglePlayerControllable(playerid0);
            }
        }
        if( 
listitem == )
        {                     
//scout
            
if( rank[playerid] >= )
            {
                
SendClientMessage(playeridCOLOR_GREY"You chose the scout as your class.");
                
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                
gPlayerClass[playerid] = SCOUT;
                
PickedClass[playerid] = 1;
                
SetPlayerVirtualWorld(playerid0);
                
TogglePlayerControllable(playerid1);
                if(
gTeam[playerid] == TEAM_USA)
                {
                    
SetPlayerSkin(playerid128);
                    
SetPlayerArmour(playerid25);
                    
GivePlayerWeapon(playerid28200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid22200);
                }
                if(
gTeam[playerid] == TEAM_GERMANY)
                {
                    
SetPlayerSkin(playerid202);
                    
SetPlayerArmour(playerid25);
                    
GivePlayerWeapon(playerid28200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid22200);
                }
                else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid24200);
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"You have to have atleast rank 1 to be a scout!");
                
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Pick Your Class""Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander""Select""Cancel");
                
TogglePlayerControllable(playerid0);
            }
        }
        if(
listitem == 8)
        {
            if(
rank[playerid] >= 8)
            {
                
SendClientMessage(playeridCOLOR_GREY"You chose general (commander) as your class.");
                
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                
gPlayerClass[playerid] = GENERAL;
                
PickedClass[playerid] = 1;
                
SetPlayerVirtualWorld(playerid0);
                
TogglePlayerControllable(playerid1);
                if(
gTeam[playerid] == TEAM_USA)
                {
                    
SetPlayerSkin(playerid283);
                    
SetPlayerArmour(playerid95);
                    
GivePlayerWeapon(playerid31200);
                    
GivePlayerWeapon(playerid27200);
                    
GivePlayerWeapon(playerid28200);
                    
GeneralClass[playerid][1] = 1;
                }
                if(
gTeam[playerid] == TEAM_GERMANY)
                {
                    
SetPlayerSkin(playerid288);
                    
SetPlayerArmour(playerid95);
                    
GivePlayerWeapon(playerid31200);
                    
GivePlayerWeapon(playerid27200);
                    
GivePlayerWeapon(playerid28200);
                    
GeneralClass[playerid][2] = 1;
                }
                else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                {
                    
GivePlayerWeapon(playerid31200);
                    
GivePlayerWeapon(playerid27200);
                    
GivePlayerWeapon(playerid28200);
                    if(
gTeam[playerid] == TEAM_RUSSIAGeneralClass[playerid][3] = 1;
                    if(
gTeam[playerid] == TEAM_JAPANGeneralClass[playerid][4] = 1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"You have to have atleast rank 8 to be a general (commander)!");
                
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Pick Your Class""Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander""Select""Cancel");
                
TogglePlayerControllable(playerid0);
            }
        }
        if( 
listitem == )
        {                     
// admin NOTE: general is 8
            
if( adminlevel[playerid] > )
            {
                
SendClientMessage(playeridCOLOR_GREY"You chose the Admin as your class.");
                
SendClientMessage(playeridCOLOR_GREY"You can type /switchclass to change your class again.");
                
gPlayerClass[playerid] = ADMIN;
                
PickedClass[playerid] = 1;
                
SetPlayerVirtualWorld(playerid0);
                
TogglePlayerControllable(playerid1);
                
SetPlayerColor(playeridLIGHTGREEN);
                if(
gTeam[playerid] == TEAM_USA)
                {
                    
SetPlayerSkin(playerid217);
                    
SetPlayerArmour(playerid100);
                    
GivePlayerWeapon(playerid3820000);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid2220000);
                }
                if(
gTeam[playerid] == TEAM_GERMANY)
                {
                    
SetPlayerSkin(playerid217);
                    
SetPlayerArmour(playerid100);
                    
GivePlayerWeapon(playerid3820000);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid2220000);
                }
                else if( 
gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
                {
                    
SetPlayerSkin(playerid217);
                    
SetPlayerArmour(playerid100);
                    
GivePlayerWeapon(playerid3820000);
                    
GivePlayerWeapon(playerid11);
                    
GivePlayerWeapon(playerid2220000);
                }
            }
            else 
SendClientMessage(playeridCOLOR_RED"Bye bye - You aren't admin !");
        }
    }
    return 
1;

Depois disso, aperte CTRL + G e digite 2488 na caixa que irб aparecer na sua tela.

Entгo na linha 2488, provavelmente, vocк irб encontrar GetPlayerName, entгo apague tudo que esteja entre a primeira chave ( { ) e ultima ( } ).

Se continuar a dar erros, poste aqui as linhas e os erros.
Reply


Messages In This Thread
[AJUDA]Erro rank[playerid] - by [US]NAVY[SAPD] - 05.08.2011, 12:36
Respuesta: [AJUDA]Erro rank[playerid] - by Sergio_MOW - 05.08.2011, 14:58
Re: [AJUDA]Erro rank[playerid] - by [US]NAVY[SAPD] - 05.08.2011, 15:22
Respuesta: [AJUDA]Erro rank[playerid] - by Sergio_MOW - 05.08.2011, 15:24
Re: [AJUDA]Erro rank[playerid] - by Shadoww5 - 05.08.2011, 16:30
Re: [AJUDA]Erro rank[playerid] - by [US]NAVY[SAPD] - 05.08.2011, 16:45
Re: [AJUDA]Erro rank[playerid] - by Shadoww5 - 05.08.2011, 18:29

Forum Jump:


Users browsing this thread: 1 Guest(s)