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

movements, problem

Inteligentny

Im not.
Joined
Aug 2, 2008
Messages
485
Reaction score
0
Yo I was wondering what function I must use to get work
Code:
getPlayerStorageValue(cid,42355) == 1
:| please if know what can be wrong here post, u will help me a lot...


PHP:
function onStepIn(cid, item, position, fromPosition, pos)
local tele = {x=1292, y=1484, z=7} --Where they will be teleported
local telepos = {x=1026,y=1016,z=8}  -- 
	if item.actionid == 111331 then
		if getPlayerStorageValue(cid,42355) == 1 then	
		doTeleportThing(cid, telepos, TRUE)
		end
	
	end
end
 
Isn't needed "local" variables into the function use without "local"
PHP:
function onStepIn(cid, item, position, fromPosition, pos)
 
tele = {x=1292, y=1484, z=7} 

telepos = {x=1026, y=1016, z=8}
   
 if item.actionid == 111331 then
        if getPlayerStorageValue(cid,42355) == 1 then    
        doTeleportThing(cid, telepos, TRUE)
        end
    end
end
 
omg, actually its no big diffrence because it will work with local or without it.......

U did not help me :| script is not working ...

Hmm! if you using "OnStepIn" you need add the value in the tiles,
PHP:
function onStepIn(cid, item, position, fromPosition, pos)
 tele = {x=1292, y=1484, z=7} 
telepos = {x=1026, y=1016, z=8}
    if getPlayerStorageValue(cid,42355) == 1 then    
        doTeleportThing(cid, telepos, TRUE)
        end
else
doPlayerSendTextMessage(cid,6,"You cant pass")
end  
end
 
It should looks


PHP:
function onStepIn(cid, item, position, fromPosition, pos)
telepos = {x=1026, y=1016, z=8}
posback = {x=1026, y=1019, z=8}
    	if getPlayerStorageValue(cid,11131,1) == 1 then    
        doTeleportThing(cid, telepos, TRUE) 
	else
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'you cant pass')
	doTeleportThing(cid, posback, TRUE)
	end  
end


But when I have this storage the telepos = {x=1026, y=1016, z=8} is not working... its teleporting me back :/
 
no sorry its not all at :p I edited my post look up :////



edit: Also i tried this one:

PHP:
function onStepIn(cid, item, position, fromPosition, pos)
telepos = {x=1026, y=1016, z=8}
posback = {x=1026, y=1019, z=8}
    	if getPlayerStorageValue(cid,73726) == 0 then    
    	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'you cant pass')
	doTeleportThing(cid, posback, TRUE)
       
	elseif getPlayerStorageValue(cid,73726) == 1 then 
	 doTeleportThing(cid, telepos, TRUE) 
	end  
	
end

please someone advanced help me with this problem xd I spent 4 hours and have nothing :|
 
Last edited:
I want just make simply sctipt onStep...

When someone have storagevalue for example 11111 it should teleport him to next room, but if he havent this storagevalue it should move him back... or teleport to depo or anything but those scripts are not working:///
 
if you want to add storage at pass, add this:

under
PHP:
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Enjoy")
PHP:
setPlayerStorageValue(cid,storage)

PHP:
function onStepIn(cid, item, position, fromPosition, pos)
telepos = {x=1026, y=1016, z=8}
posback = {x=1026, y=1019, z=8}
storage = 11111

   if getPlayerStorageValue(cid,storage) == 1 then -- check storage
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Enjoy") -- this msg has sent if the storage is right
    doTeleportThing(cid, telepos) -- player is teleported to the next room
       end
else -- if nothing function cannot be completed, this goin to happen
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Back!")
doTeleportThing(cid, posback) -- player go to pos back
    end  
    end
 
ok thank you, its working, I have only one question If I want to add two storage value to pass what I have to edit?

Code:
storage = 11111,11112
???? if I do that its not working :p
 
Try this.. I've removed those stupid comment lines >.>
Code:
function onStepIn(cid, item, position, fromPosition, pos)
telepos = {x=1026, y=1016, z=8}
posback = {x=1026, y=1019, z=8}
storage = 11111
storage2 = 22222

if getPlayerStorageValue(cid,storage) == 1 and getPlayerStorageValue(cid,storage2) == 1 then
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Puff!")
	doTeleportThing(cid, telepos)
end
else
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Puff!")
	doTeleportThing(cid, posback)
end  
end

@edited 10:41
Yea forgotten to change number of second storage :p

@edited 10:42
Erm, ends are somewhat messed up?! Aveo, you sux :F

It might not work, if not, i will remake this thing.
 
Last edited:
ye before else shouldnt be "end" :p

its working with multiple storage value, thank you guys very much.... Im still learning :p (hard learning) heh :) reps

and maybe someone will need it so here is all script:



PHP:
function onStepIn(cid, item, position, fromPosition, pos)
telepos = {x=1026, y=1016, z=8}
posback = {x=1026, y=1019, z=8}
storage = 11111
storage2 = 22222
   if getPlayerStorageValue(cid,storage) == 1 and getPlayerStorageValue(cid,storage2) == 1 then
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Enjoy")
    doTeleportThing(cid, telepos)
       
else 
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Back!")
doTeleportThing(cid, posback) 
    end  
    end
 
Last edited:
Heh, no problem. Those things that we are writing in LUA are pretty easy. You really do not want to look at "advanced lua" >.>
 
Back
Top