Jump to content

Recommended Posts

  • Premium

Hello, i need something to prohibit the wearing of weapons and armors, pets, mounts... on ox maps, i have only this for skills:

 

#ifdef ENABLE_BLOCK_SKILL_OXEVENT
#include "questmanager.h"
	DWORD dwFlagBlockSkill = quest::CQuestManager::instance().GetEventFlag("enable_block_skill_oxevent");
	
	if (dwFlagBlockSkill > 0 && GetMapIndex() == 113)
	{
		if (quest::CQuestManager::instance().GetEventFlag("oxevent_status") != 0)
		{
			ChatPacket(CHAT_TYPE_NOTICE, "[OXEVENT] You can not use skills during the event ox !");	
			return false;
		}		
	}
#endif

 

plague.png.1f5de75b42146262dcd655a5a8078

Link to comment
Share on other sites

unsigned bodyPart = GetPart(PART_MAIN);
    switch ( bodyPart )
    {
        case 0:
        case 1:
        case 2:
            break;
        default:
            ChatPacket(CHAT_TYPE_NOTICE, "[OXEVENT] Take off your armor!");
            break;
    }

 

MAKE WITH PART_WEAPON ETC..

 

 

  • Love 1
Link to comment
Share on other sites

  • Premium
30 minutes ago, joshi said:

unsigned bodyPart = GetPart(PART_MAIN);
    switch ( bodyPart )
    {
        case 0:
        case 1:
        case 2:
            break;
        default:
            ChatPacket(CHAT_TYPE_NOTICE, "[OXEVENT] Take off your armor!");
            break;
    }

 

MAKE WITH PART_WEAPON ETC..

 

 

thanks but i'm a beginner i dont know how to do that, thanks anyway ?

Edit:

If i'm right i need to create an class with ox index map and when an player will join on that map the function will take his armor,costume,hair... off hmm... ?

Edited by DemOnJR

plague.png.1f5de75b42146262dcd655a5a8078

Link to comment
Share on other sites

When a function in sf xy function 

 

Make check files

 

unsigned bodyPart = GetPart(PART_MAIN);
    switch ( bodyPart )
    {
        case 0:
        case 1:
        case 2:

            CheckWeapon function
            break;
        default:
            ChatPacket(CHAT_TYPE_NOTICE, "[OXEVENT] Take off your armor!");
            break;
    }

 

function CheckWeapon

unsigned WeaponPart = GetPart(PART_WEAPON);
    switch ( WeaponPart )
    {

        case 0:

            MAKE ALL FUNCTION AND LAST FUNCTION TAKE OPEN_OX_EVENT()

            break;
        default:
            ChatPacket(CHAT_TYPE_NOTICE, "[OXEVENT] Take off your Weapon!");
            break;
    }

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.