Jump to content

New affect problem


Recommended Posts

Hi.

I'm trying to add a new effect to players via an eventflag, however I can not get it right.

The function I currently have is:

 

DWORD idplayer = GetPlayerID();
    
    char sFlag[100];
    snprintf(sFlag, sizeof(sFlag), "prest_%d", idplayer);

else if (quest::CQuestManager::instance().GetEventFlag(sFlag) == 1)
        {
            m_afAffectFlag.Set(AFF_PREST_1);
            ChatPacket(CHAT_TYPE_INFO, "Test work");
            
        }

How can I make it work well?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developer
6 hours ago, NinfTrack said:

DWORD idplayer = GetPlayerID();
    
    char sFlag[100];
    snprintf(sFlag, sizeof(sFlag), "prest_%d", idplayer);

else if (quest::CQuestManager::instance().GetEventFlag(sFlag) == 1)
        {
            m_afAffectFlag.Set(AFF_PREST_1);
            ChatPacket(CHAT_TYPE_INFO, "Test work");
            
        }

How can I make it work well?

char csFlag[100];
snprintf(csFlag, sizeof(csFlag), "prest_%d", idplayer);
std::string sFlag = csFlag;

if (quest::CQuestManager::instance().GetEventFlag(sFlag) == 1)
{
	m_afAffectFlag.Set(AFF_PREST_1);
	ChatPacket(CHAT_TYPE_INFO, "Test work");
}

 

My youtube channel  on which you can see my works here

Link to comment
Share on other sites

hace 1 hora, riku11 dijo:

char csFlag[100];
snprintf(csFlag, sizeof(csFlag), "prest_%d", idplayer);
std::string sFlag = csFlag;

if (quest::CQuestManager::instance().GetEventFlag(sFlag) == 1)
{
	m_afAffectFlag.Set(AFF_PREST_1);
	ChatPacket(CHAT_TYPE_INFO, "Test work");
}

 

Thanks for your reply but it did not work.

UP

Link to comment
Share on other sites

En 4/10/2017 a las 6:30, riku11 dijo:

does not complile or does not work?
if it do not compile post  the error.
if it does not work i want to see how you set the event_flag.

It does not work, compiles well but setting the event flag does not do its job.

Inside the game I assign my character:

/e prest_2295 1

The 2295 is the ID of my character based on the database.

 

#UP UP

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.