Okay so I'm trying to make a base for my gang on an RP server and I want a script that teleports you from the base in the outside world to the interior. There should be a marker infront of the door and if you walk into it, you need to enter a password via GUI. The password can be whatever.
So I got learning how to make this and I started on it but nothing works help me
What I've made already:
http://rapidshare.com/files/398928926/B ... g_base.zip
The file includes mapedit
The Coordinates should be:
outside entrance = 1923, -1411, 14 (the marker you walk into to open the GUI that asks for the password)
outside exit = 1917, -1415, 14 (where you come out when you walk into interior exit)
interior entrance = 565.637, -124.3715133667, 964.71618652344 (int world 11 + after you put in the password you teleport here)
interior exit = 532.12658691406, -85.317939758301, 964.66149902344 (int world 11 + there should be a marker)
Just tell me what's wrong and I'll (try) to fix it myself.
I'll post the code in here just in case:
--LimEDuuD's gang base teleports settings and blips
addEventHandler("onPlayerConnect", getRootElement(), bmxersetup)
function bmxersetup()
bmxent = createMarker ( 1923, -1411, 14, "corona", 1, 255, 0, 0, 255 ) then
bmxerblip createBlip ( 1923, -1411, 14, [int icon=19, int size=2, int r=255, int g=0, int b=0, int a=255, int ordering=0, float visibleDistance=2000.0, visibleTo = getRootElement()])
end
function baseentry(bmxent, matchingDimension true)
if getElementType(bmxent) == "player" then
outputChatBox( "Vehicles can't enter the gang base!", getRootElement(), 255, 255, 0 )
elseif getElementType(bmxent) == "vehicle" then
outputChatBox( "Vehicles can't enter the gang base!", getRootElement(), 255, 255, 0 )
end
end
addEventHandler( "onMarkerHit", bmxent, baseentry )
end
and the GUI:
--stupid GUI for gang Base by LimEDuuD
function createbmxerWindow()
local X = 0.375
local Y = 0.375
local Width = 0.25
local Height = 0.25
basicpw = guiCreateWindow(X, 0.5, Width, Height, "Please Enter The Password", true)
guiCreateLabel(0.415, 0.2, 0.5, 0.15, "Password", true, basicpw)
edtPass = guiCreateEdit(X, 0.5, Width, Height, "", true, basicpw)
guiEditSetMaxLength(edtPass, 50)
btnLogin = guiCreateButton(0.415, 0.7, 0.25, 0.2, "Enter", true, basicpw)
showCursor(true)
guiSetInputEnabled(true)
addEventHandler("onClientGUIClick", Enter, teleportPlayerbmx, false)
function teleportPlayerbmx(button,state)
if button == "left" and state == "up" then
if source == Enter then
setElementPosition ( source, 565.637, -124.3715133667, 964.71618652344 [,warp = true ] ), getRootElement() then
setCameraTarget(client,client) then
outputChatBox("You climb down long flights of stairs...") then
outputChatBox("Welcome to base, gang member!")
-- How can I make it so that you have to enter a specific password only?
end