Hello.
I've requesting somebody for remake me this script
Anyone can remake this for:
- If player pass door , then adding to player Storage
- If player back from door (pass door second time), then adding to player storage,1
I've requesting somebody for remake me this script
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = item.actionid - 1000
if item.actionid == 0 or getPlayerLevel(cid) < level then
return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You must be stronger.')
end
local pos, door = getThingPos(cid), toPosition
if isInArray({door.x-1, door.x+1}, pos.x) and pos.y == door.y then
door.x = door.x + (pos.x < door.x and 1 or -1)
elseif isInArray({door.y-1, door.y+1}, pos.y) and pos.x == door.x then
door.y = door.y + (pos.y < door.y and 1 or -1)
else
return doPlayerSendCancel(cid, 'You must stand in front of the door to pass!')
end
doTeleportThing(cid, door)
doSendMagicEffect(door, 12)
return true
end
Anyone can remake this for:
- If player pass door , then adding to player Storage
- If player back from door (pass door second time), then adding to player storage,1
Last edited: