[Ajuda] problema no comando /darhelper
#1

Ola alguem pode me ajudar nesse comando, pois eu digito /darhelper e ele fala que nao tem mais vagas sendo que nao tem nenhum helper e ao mesmo tempo que fala que nao tem vaga ele fala que o player foi promovido a helper e nao foi!

comando:
PHP код:
    if(strcmp(cmd"/darhelper"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 1339)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo tem autorizaзгo para usar esse comando.");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darhelper [id] [Nivel]");
                return 
1;
            }
            
level strval(tmp);
            
GetPlayerName(para1giveplayersizeof(giveplayer));
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "   Vocк foi promovido para level  %d de Helper - Por %s"levelsendername);
            
SendClientMessage(para1COLOR_LIGHTBLUEstring);
            
format(stringsizeof(string), "   Vocк promoveu o(a) %s Para o level %d de Helper."giveplayer,level);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            if(
IsPlayerConnected(para1))
            {
                if(
para1 != INVALID_PLAYER_ID)
                {
                    for(new 
1<= sizeof(HelpInfo); i++)
                    {
                        if(
PlayerInfo[para1][pHelper] > 0)
                        {
                            if(
strcmp(HelpInfo[i][gMembro],PlayerName(para1),true) == 0)
                            {
                                
PlayerInfo[para1][pHelper] = level;
                                break;
                            }
                            else if(
level == 0)
                            {
                                if(
strcmp(HelpInfo[i][gMembro],PlayerName(para1),true) == 0)
                                {
                                    
strmid(HelpInfo[i][gMembro], "Vazio"0strlen("Vazio"), 255);
                                    
PlayerInfo[para1][pHelper] = 0;
                                    
HelpInfo[i][HelperAtivo] = 0;
                                    break;
                                }
                                
PlayerInfo[para1][pHelper] = level;
                            }
                            
//SaveHelp();
                            
return 1;
                        }
                        else if(
PlayerInfo[para1][pHelper] == 0)
                        {
                            
HelpsVaga();
                            if(
VagaSobrando == 0) { SendClientMessage(playeridCOLOR_GRAD1"Nгo hб mais vagas na lista use /limparhelper primeiro."); return 1; }
                            if(
strcmp(HelpInfo[i][gMembro],"Vazio",true) == 0)
                            {
                                
PlayerInfo[para1][pHelper] = level;
                                
HelpInfo[i][HelperAtivo] = 1;
                                
HelpInfo[i][gMembro] = giveplayer;
                                
//SaveHelp();
                                
break;
                            }
                        }
                    }
                }
            }
        }
        return 
1;
    } 
quem poder ajudar agradeзo
Reply


Messages In This Thread
problema no comando /darhelper - by igor97m - 24.07.2015, 02:39

Forum Jump:


Users browsing this thread: 1 Guest(s)