Jump to content

bugerman

Advanced members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by bugerman


  1. 13 minutes ago, mkhzaleh said:
    
    function sendid(role,cha,item_id,quantity)
    	if(type(cha) ~= 'userdata') then
    		cha = GetPlayerByName(cha)
    	end
    	--local cha = GetPlayerByName(cha)
    	local gmname = GetChaDefaultName(role)
    	if cha == nil then
    		HelpInfo(role,0,"Player is offline or in another gameserver try again~!~")
    		return 0 
    	end
    	
    	if(cha ~= nil)then
    		if HasLeaveBagGrid(cha, 1) ~= LUA_TRUE or KitbagLock(cha, 0) == LUA_FALSE then
    			GiveItemX(cha, 0, item_id, quantity, 4)
    			HelpInfoX(role,0,"Storage box:You gave Player ["..GetChaDefaultName(cha).."]["..GetItemName(item_id).."x["..quantity.."]")
    			RefreshCha(cha)
    		else
    			MakeItem(cha,item_id,quantity,4)
    			HelpInfoX(role,0,"You gave Player ["..GetChaDefaultName(cha).."]["..GetItemName(item_id).."x["..quantity.."]")
    		end
    		LG("send item to player", "GM ["..gmname.."]sent to  Player:["..GetChaDefaultName(cha).."], :["..GetItemName(item_id).."] ,quantity : " ..quantity.. "  :, successfuly")
    		RefreshCha(cha)
    	end	
    	--RefreshCha(cha)
    end

     

    Tnx

×
×
  • Create New...