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

[REQUEST] !house-especial

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I wanted a script that you can put the name of the character in the script
and he has access to go in postion "X"

Example:
The player says "house and he has access to go to X = 1, Y = 1, Z = 7 he could go.
If the player does not have access it will say "MSG"

EXEMPLE²:

Code:
local player:

        "Imma Be"
        "Getting Over"
 
LUA:
function onSay(cid,words,param)
local s = 10050 --- storage
	if s < 1 then
		setPlayerStorageValue(cid,s,1)
		doPlayerSendTextMessage(cid,20,'You gained acces.')
	else
		doPlayerSendTextMessage(cid,20,'You already have acces.')
	end
	return true
end

LUA:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local s,p = 10050,{x=1,y=1,z=7} -- storage , position
	if getPlayerStorageValue(cid,s) > 0 then
		doPlayerSendTextMessage(cid,20,'Welcome.')
	else
		doPlayerSendTextMessage(cid,20,'You don\'t have acces')
		doTeleportThing(cid,p)
		doSendMagicEffect(p,10)
	end
	return true
end
 
as i got it if player has his name in script he will have the acess to go to position
LUA:
local m = {["Karim"]={pos = {x=1000,y=1000,z=7}}, ["Kimo"]={pos = {x=1001,y=1000,z=7}}, ["Admin"]={pos = {x=1002,y=1000,z=7}}}
local msg = "You cant go there"
function onSay(cid, words, param)
name = m[getCreatureName(cid)]
if not name then
   doPlayerSendCancel(cid,msg)
   return true
end
  doTeleportThing(cid,name.pos)
  doSendMagicEffect(getPlayerPosition(cid),10)
 return true
end
 
Last edited:
Back
Top