RandomTP
#11
[Image: errrr.png]

PHP Code:
function Initialize(Plugin)
    
Plugin:SetName("RandomTP")
    
Plugin:SetVersion(1)

    
cPluginManager.BindCommand("/rtp""randomTP.rtp"Randomtp" ~ Random Teleport");

    
LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
    return 
true
end

function Randomtp(SplitPlayer)
    if (
#Split ~= 1) then
        
Player:SendMessage("Usage: /rtp")
        return 
true
    
else
        
local X math.random(-20002000)
        
local Z math.random(-20002000)
        
local _Height
         
        local World 
Player:GetWorld()
        
World:ChunkStay({{math.floor(16), math.floor(16)}}, nil,  
            function()
                
_Height World:TryGetHeight(XZ)
            
end
        
)
        
Player:TeleportToCoords(XHeightZ)
        
Player:SendMessage(cChatColor.Yellow .. "Cords")
        
Player:SendMessage("X: " .. X)
        
Player:SendMessage("Y: " .. Height)
        
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: 1 Guest(s)