RandomTP
#1
Hi, its my first plugin in LUA.
I don't know how to check the ID of block in random XYZ position.
Sometimes its move me into blocks. I want to teleport olny on grass, sand, dirt.
Please help Smile
PHP Code:
function Randomtp(SplitPlayer)
    if (
#Split ~= 1) then
        
Player:SendMessage("Usage: /rtp")
        return 
true
    
else
        
math.random(-20002000)
        
math.random(40,70)
        
=  math.random(-20002000)
        
Player:TeleportToCoords(XYZ)
        
Player:SendMessage(cChatColor.Yellow .. "Cords")
        
Player:SendMessage("X: " .. X)
        
Player:SendMessage("Y: " .. Y)
        
Player:SendMessage("Z: " .. Z)
    
end
    
return true
end 
Reply
Thanks given by:


Messages In This Thread
RandomTP - by Keith - 08-30-2015, 12:01 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 12:11 AM
RE: RandomTP - by Keith - 08-30-2015, 01:12 AM
RE: RandomTP - by DiamondToaster - 08-30-2015, 01:34 AM
RE: RandomTP - by Keith - 08-30-2015, 02:01 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 02:07 AM
RE: RandomTP - by Keith - 08-30-2015, 04:39 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 04:45 AM
RE: RandomTP - by Keith - 08-30-2015, 04:50 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 04:53 AM
RE: RandomTP - by Keith - 08-30-2015, 04:59 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 05:02 AM
RE: RandomTP - by Keith - 08-30-2015, 06:53 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 07:01 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 07:06 AM
RE: RandomTP - by tigerw - 08-30-2015, 09:02 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 05:58 PM
RE: RandomTP - by NiLSPACE - 08-31-2015, 04:24 AM
RE: RandomTP - by xoft - 08-31-2015, 06:09 AM



Users browsing this thread: 2 Guest(s)