• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

DoRemoveItem

hesczu

New Member
Joined
Jun 14, 2007
Messages
148
Reaction score
0
someone can fix my script? :D


Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local config = {
sw1 = 1313,
item = 1945,
value= 2020,
}

if item.uid == config.sw1 and item.itemid == config.item and getGlobalStorage(config.value) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Done")	
	doRemoveItem(getThingfromPos({x=1022, y=1183, z=7, stackpos=1}).uid,1)
end
return TRUE
end
 
Last edited:
@Rizz

I cant cuz i need these parameter :D

@Evil Hero

Dont Work :D i try that 5-10 times after post :D
 
Last edited:
sorry didn't saw the config table..

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local config = {
sw1 = 1313,
item = 1945,
sw2 = 7232,
value= 2020
}

if item.uid == config.sw1 and item.itemid == config.item and getGlobalStorageValue(config.value) == TRUE then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Done")	
	doRemoveItem(getThingfromPos({x=1022, y=1183, z=7, stackpos=1}).uid,config.sw2,1)
end
return TRUE
end
 
Last edited:
Yeah my mistake but dont work, i think the wrong part is in doRemoveItem cuz when i used the "switch" only send it doPlayerSendTextMessage :D
 
idk which one of them is the item which has to be removed but the part is really wrong you have to put the item between the

Code:
getThingfromPos({x=1022, y=1183, z=7, stackpos=1}).uid,ITEM,1)
 
Back
Top