• 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!

Help...setHouseOwner

Kayan

Active Member
Joined
Sep 19, 2007
Messages
1,561
Reaction score
38
Location
Santa Catarina
see my action
PHP:
function onUse(cid, item, frompos, item2, topos) 

playername = getCreatureName(cid)
if item.uid == 2526 and item.itemid == 1945 then
doTransformItem(item.uid,item.itemid+1)
setHouseOwner(1, playername)
doSendMagicEffect(topos,4)
doPlayerSendTextMessage(cid,18,"You are new owner of Castel!")

elseif item.uid == 2526 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)


end
end

I use this action..

But him no send player name owner of house ID 1


what's problem? ;x
 
Example. And use the action, the function it is to pick the name of the player and send in the door of the house ID 1, who uses the actin became owner of the house, but is not working = \
 
PHP:
function onUse(cid, item, frompos, item2, topos) 

playername = getPlayerGUID(cid)
if item.uid == 2526 and item.itemid == 1945 then
doTransformItem(item.uid,item.itemid+1)
setHouseOwner(1, playername)
doSendMagicEffect(topos,4)
doPlayerSendTextMessage(cid,18,"You are new owner of Castel!")

elseif item.uid == 2526 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)


end
return TRUE
end
 
Last edited:
Thx, now work ;D

Its possible add time in action?

Use action.. Switch move to 1946

only after 2 min you can move switch back to position 1945..

It's Possible?
 
Um... you can do it like onUse the lever is deleted and event is starting, after 30 sec or so the lever is spawning again.

PHP:
function createLever(cid, item)
      local pos = x,y,z
      doSetItemActionId(doCreatreItem(pos, id, 1), uid)
end

dunno if it is properly but you can try...

then when they use lever add there
addEvent(createLever, 30000, cid)

And change ur levers uniqueId to ActionId, coz theres no function to set uid.
 
Back
Top