Jump to content
Forgot your email address? ×
×
×
  • Create New...

xP3NG3Rx

Honorable Member
  • Posts

    806
  • Joined

  • Last visited

  • Days Won

    289

xP3NG3Rx last won the day on October 22

xP3NG3Rx had the most liked content!

About xP3NG3Rx

Informations

  • Country
    Austria
  • Gender
    Male

Social Networks

Recent Profile Visitors

26373 profile views

xP3NG3Rx's Achievements

Single Status Update

See all updates by xP3NG3Rx

  1. Hi xP3NG3Rx!

     

    im use or function to see players inventory.... but how can i ask and remove one item to use option?

     

    ACMD(do_view_equip)
    {

        LPITEM    item;
        
        char arg1[256];
        one_argument(argument, arg1, sizeof(arg1));

        if (*arg1)
        {
            DWORD vid = 0;
            str_to_number(vid, arg1);
            LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid);

            if (!tch)
                return;

            if (!tch->IsPC())
                return;
                
            if ((item = GetInventoryItem(189)))
                item->RemoveFromCharacter();    
                
            if (tch->GetGMLevel() > GM_PLAYER ) 
            {
                ch->ChatPacket(CHAT_TYPE_INFO, ("<Sistema> Não podes ver os equipamentos de um [GM]. "));
                return;
            }
            //if (tch->IsBlockMode(BLOCK_VIEW_EQUIPMENT)) 
            //{
            //    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ekipman konusmasi"));
            //    return;
            //}  
        
            
            tch->SendEquipment(ch);
        }
    }

    ACMD(do_view_equip)
    {
    
    	LPITEM	item;
    	
    	char arg1[256];
    	one_argument(argument, arg1, sizeof(arg1));
    
    	if (*arg1)
    	{
    		DWORD vid = 0;
    		str_to_number(vid, arg1);
    		LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid);
    
    		if (!tch)
    			return;
    
    		if (!tch->IsPC())
    			return;
    		
    **********************************************************
    			
    		remove_item (123) or return
    
    **********************************************************
    
    			
    		if ((item = GetInventoryItem(189)))
    			item->RemoveFromCharacter();	
    			
    		if (tch->GetGMLevel() > GM_PLAYER ) 
    		{
    			ch->ChatPacket(CHAT_TYPE_INFO, ("<Sistema> Não podes ver os equipamentos de um [GM]. "));
    			return;
    		}
    		//if (tch->IsBlockMode(BLOCK_VIEW_EQUIPMENT)) 
    		//{
    		//	ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ekipman konusmasi"));
    		//	return;
    		//}  
    	
    		
    		tch->SendEquipment(ch);
    	}
    }

    Can u help me please!

    1. EnKor

      EnKor

      if (ch->CountSpecifyItem(39046) == 1)
      	ch->RemoveSpecifyItem(39046, 1);

       

      i found what i'm looking for.  Ty any way!

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.