Resultados 1 a 10 de 14

Tópico: PostVIP

Threaded View

  1. #1
    Developer C++ LorenStudio's Avatar




    Data de Ingresso
    Jul 2020
    Posts
    136
    Thanks Thanks Given 
    172
    Thanks Thanks Received 
    269
    Thanked in
    60 Posts
    Mencionado
    10 Post(s)
    País
    Canada

    PostVIP

    Bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. no meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

    OBS: ESSA NÃO É A MELHOR FORMA DE SE FAZER ISSO, USE ESSA BASE PARA APRIMORAR O MESMO.


    CommandManager.cpp
    Código:
    bool CCommandManager::CommandPost(LPOBJ lpObj,char* arg) // OK{
    
    
        gFilter.CheckSyntax(arg);
    
    
        if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 0)
        {
            GDGlobalPostSend(gMapServerManager.GetMapServerGroup(),0,lpObj->Name,arg);
            
         }
    
    
          if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 1)
        {
            PostMessage2(lpObj->Name,gMessage.GetMessage(1534),arg);
            
         }
        if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 2)
        {
            PostMessage3(lpObj->Name,gMessage.GetMessage(1535),arg);
            
        }
    
    
          if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 3)
        {
            PostMessage4(lpObj->Name,gMessage.GetMessage(1536),arg);
            
        }
    
    
        gLog.Output(LOG_COMMAND,"[CommandPost][%s][%s] - (Message: %s)",lpObj->Account,lpObj->Name,arg);
    
    
        return 1;
    
    }



    ServerInfo.H
    Código:
    int m_CommandPostVIP[MAX_ACCOUNT_LEVEL];


    ServerInfo.CPP
    Código:
        this->m_CommandPostVIP[0] = GetPrivateProfileInt(section,"CommandPostVIP_AL0",0,path);
    
        this->m_CommandPostVIP[1] = GetPrivateProfileInt(section,"CommandPostVIP_AL1",1,path);
    
    
        this->m_CommandPostVIP[2] = GetPrivateProfileInt(section,"CommandPostVIP_AL2",2,path);
    
    
    
        this->m_CommandPostVIP[3] = GetPrivateProfileInt(section,"CommandPostVIP_AL3",3,path);



    Message.txt
    Código:
    1534        "[FREE] %s"
    1535        "[VIP1] %s"
    1536        "[VIP2] %s"



    LEMBRANDO USE ISSO COMO BASE PARA FAZER ALGO MELHOR!!


    PROJETOS:
    [Somente membros podem ver os links. ][Somente membros podem ver os links. ]

  2. The Following 6 Users Say Thank You to LorenStudio For This Useful Post:


Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • You may not post Resposta(s)
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •  
Sobre nós
Somos uma comunidade em atividade a 8 anos que aborda assuntos relacionados a games em geral, principalmente games MMORPG. e que busca sempre ajudar os membros através de conteúdos, tutoriais e suporte...
Nossos anunciantes
Hinetworks
VelozHost
InovHost
Rede Sociais