
Xeno
Members-
Posts
728 -
Joined
-
Last visited
Everything posted by Xeno
-
thanks for help guys but iv done it
-
Hi Guys, Im a bit stuck, i have made a UFO that moves around, but i would like a beam of light. how would i go around doing that?
-
Sorry, i was gunna edit but then i got distracted , thank you anyway I cannot find it, its called tractor beam
-
Is there a way i make a huge like beam?
-
I COULD KISS YOU! THANKS THANKS THANKS MAN
-
local X,Y,Z = getElementPosition ( UFOA )
-
Im not really sure, but i had seen somthink about a ped haveing a name, maby you could remove the ped and there would be text there? heres the script local rootElement = getRootElement() --define what rootElement is (that's probably your main problem) local NPC = createPed(124,0,0,5) local screenWidth, screenHeight = guiGetScreenSize() --you don't need to get this every frame, it will not change local maxrange = 45 -- the max range the text can be seen (modify to your preferences, i believe normal nametags use 45 too) function NPCnametag() local pedX,pedY,pedZ = getElementPosition(NPC) local sx,sy = getScreenFromWorldPosition (pedX,pedY,pedZ) local cameraX,cameraY,cameraZ = getCameraMatrix() if sx then --this will check if the ped is actually on screen (without this check you would have many errors in your debug log) if getDistanceBetweenPoints3D(cameraX,cameraY,cameraZ,pedX,pedY,pedZ) <= maxrange then --get the distance between two points in the 3d environment and check if it is smaller or the same as our maxrange dxDrawText("Bob",sx,sy,screenWidth, screenHeight,tocolor ( 255, 255, 0, 255 ), 2,"sans") --I'm not sure if the text was supposed to be invisible but I think I'll just change that too end end end function HandleTheRendering() addEventHandler("onClientRender",rootElement, NPCnametag) end addEventHandler("onClientResourceStart",rootElement, HandleTheRendering) I have tried it, try this. dxDrawText("Bob",sx,sy,screenWidth, screenHeight,tocolor ( 255, 255, 0, 255 ), 2,"sans")
-
Hi, Im in the middle of scripting a UFO that attacks SF airport and im a bit stuck, everthing works accept it doesent move, heres my script so far. root = getRootElement () players = getElementsByType ( "player" ) function UFO( player, commandname ) setElementPosition ( player, -1326, -67, 15 ) local UFO = createObject ( 17512, -1326, -67, 55, 180, 0, 0 ) outputChatBox ( "**EVERYONE GET TO SF AIRPORT, IT IS BEING ATTACKED BY UFO'S RUN!**" ) local X,Y,Z = getElementPosition ( UFOA ) local xup = -1430 local yup = 50 local zup = 55 local xup1 = 4178 local yup1 = -1632 local zup1 = 20 local xup2 = 4178 local yup2 = -1632 local zup2 = 2 setTimer ( moveObject, 2000, 1, UFOA, 10000, xup, yup, zup ) setTimer ( moveObject, 4000, 1, UFOA, 10000, xup1, yup1, zup1 ) setTimer ( moveObject, 7000, 1, UFOA, 10000, xup2, yup2, zup2 ) end addCommandHandler ( "UFO", UFO )
-
Iv given you all of it at the top...
-
Iv given you all of it at the top...
-
Ok sorry, but what is rong?? ill but in the code thing . addEventHandler("onClientGUIClick",privateclans,information,false)addEventHandler("onClientGUIClick",privateclans,information2,false)addEventHandler("onClientGUIClick",privateclans,information3,false)
-
Ok sorry, but what is rong?? ill but in the code thing . addEventHandler("onClientGUIClick",privateclans,information,false) addEventHandler("onClientGUIClick",privateclans,information2,false) addEventHandler("onClientGUIClick",privateclans,information3,false)
-
i debuged it and found these 3 lines were the rong part, but wat is rong? addEventHandler("onClientGUIClick", information, teleportPlayer, false) addEventHandler("onClientGUIClick", information2, teleportPlayer, false) addEventHandler("onClientGUIClick", information3, teleportPlayer, false)
-
i debuged it and found these 3 lines were the rong part, but wat is rong? addEventHandler("onClientGUIClick", information, teleportPlayer, false) addEventHandler("onClientGUIClick", information2, teleportPlayer, false) addEventHandler("onClientGUIClick", information3, teleportPlayer, false)
-
Hey... Im makeing a GUI, and i want when a button is pressed for it 2 spawn me somewhere, this hole script is working but one problem, its not teleporting me! help! Here is the code of the client and the server. Server side function moveThePlayer(-2222,-2222,-2222,4) -- check we have a position and rotation if x and y and z and rotation then -- get the players current skin, so we can spawn them again without losing it local skin = getElementModel(client) -- spawn the player spawnPlayer(client,-2222,-2222,-2222,rotation,284) -- make sure the players camera is on his character setCameraTarget(client,client) end end Client function privateclans() wdwLogin = guiCreateWindow(226,146,372,233,"[Private Clans]",false) guiWindowSetMovable(wdwLogin,false) guiWindowSetSizable(wdwLogin,false) tabpanel = guiCreateTabPanel(0.0242,0.0858,0.9489,0.8755,true,wdwLogin) tab1 = guiCreateTab("Info",tabpanel) login = guiCreateButton(0.010,0.100,0.970,0.800,"This whole window is only for People who have joined one of the Private Clans, if you are not a member of one of these private clans, please press F3",true,tab1) tab2 = guiCreateTab("DE login",tabpanel) login = guiCreateButton(0.010,0.100,0.970,0.800,"This Tab is ONLY for MP members. Click on this tab to login. To Join come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]",true,tab2) tab3 = guiCreateTab("Bikers Login",tabpanel) Information= guiCreateButton ( 0.010, 0.100, 0.970, 0.800, "This Tab is only for biker members, you can only join the bikers on pure invite! To be invited come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]", true, tab3 ) tab4 = guiCreateTab("Navy Login",tabpanel) Information2= guiCreateButton ( 0.010, 0.100, 0.970, 0.800, "This Tab is only for Navy members, you can only join the bikers on pure invite! To be invited come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]", true, tab4 ) tab5 = guiCreateTab("RAF Login",tabpanel) Information3= guiCreateButton ( 0.010, 0.100, 0.970, 0.800, "This Tab is only for RAF members, you can only join the bikers on pure invite! To be invited come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]", true, tab5 ) guiSetVisible(wdwLogin,false) addEventHandler("onClientGUIClick", information, teleportPlayer, false) addEventHandler("onClientGUIClick", information2, teleportPlayer, false) addEventHandler("onClientGUIClick", information3, teleportPlayer, false) bindKey("F3" , "down" , windowToggle) end function windowToggle() if (guiGetVisible(wdwLogin) == true) then guiSetVisible(wdwLogin, false) showCursor(false) elseif (guiGetVisible(wdwLogin) == false) then guiSetVisible(wdwLogin, true) showCursor(true) end end function teleportPlayer(button,state) if button == "left" and state == "up" then if source == teleportButtonLS then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,0) outputChatBox("Welcome to the DE base") -- otherwise, if the player clicked on the SF teleport button elseif source == teleportButtonSF then -- trigger the server with our San Fierro coordinates triggerServerEvent("movePlayerToPosition",getLocalPlayer(),-2265.5,534.0,35.0,270) -- output a message to the player outputChatBox("Welcome to the Bikers base!") -- otherwise, if the player clicked on the LV teleport button elseif source == teleportButtonLV then -- trigger the server with our Las Venturas coordinates triggerServerEvent("movePlayerToPosition",getLocalPlayer(),2036.9,1545.2,10.8,270) -- output a message to the player outputChatBox("Wecome to the Navey's Ship!") end -- hide the window and all the components guiSetVisible(teleportWindow, false) -- hide the mouse cursor showCursor(false) end end addEventHandler( "onClientResourceStart" , getResourceRootElement(getThisResource()), privateclans)
-
Hey... Im makeing a GUI, and i want when a button is pressed for it 2 spawn me somewhere, this hole script is working but one problem, its not teleporting me! help! Here is the code of the client and the server. Server side function moveThePlayer(-2222,-2222,-2222,4) -- check we have a position and rotation if x and y and z and rotation then -- get the players current skin, so we can spawn them again without losing it local skin = getElementModel(client) -- spawn the player spawnPlayer(client,-2222,-2222,-2222,rotation,284) -- make sure the players camera is on his character setCameraTarget(client,client) endend Client function privateclans()wdwLogin = guiCreateWindow(226,146,372,233,"[Private Clans]",false)guiWindowSetMovable(wdwLogin,false)guiWindowSetSizable(wdwLogin,false)tabpanel = guiCreateTabPanel(0.0242,0.0858,0.9489,0.8755,true,wdwLogin)tab1 = guiCreateTab("Info",tabpanel)login = guiCreateButton(0.010,0.100,0.970,0.800,"This whole window is only for People who have joined one of the Private Clans, if you are not a member of one of these private clans, please press F3",true,tab1)tab2 = guiCreateTab("DE login",tabpanel)login = guiCreateButton(0.010,0.100,0.970,0.800,"This Tab is ONLY for MP members. Click on this tab to login. To Join come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]",true,tab2)tab3 = guiCreateTab("Bikers Login",tabpanel)Information= guiCreateButton ( 0.010, 0.100, 0.970, 0.800, "This Tab is only for biker members, you can only join the bikers on pure invite! To be invited come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]", true, tab3 )tab4 = guiCreateTab("Navy Login",tabpanel)Information2= guiCreateButton ( 0.010, 0.100, 0.970, 0.800, "This Tab is only for Navy members, you can only join the bikers on pure invite! To be invited come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]", true, tab4 )tab5 = guiCreateTab("RAF Login",tabpanel)Information3= guiCreateButton ( 0.010, 0.100, 0.970, 0.800, "This Tab is only for RAF members, you can only join the bikers on pure invite! To be invited come on the server regulary and be active on our site and forum [url=http://www.mtaproject.com]http://www.mtaproject.com[/url]", true, tab5 )guiSetVisible(wdwLogin,false)addEventHandler("onClientGUIClick", information, teleportPlayer, false) addEventHandler("onClientGUIClick", information2, teleportPlayer, false) addEventHandler("onClientGUIClick", information3, teleportPlayer, false)bindKey("F3" , "down" , windowToggle)end function windowToggle()if (guiGetVisible(wdwLogin) == true) then guiSetVisible(wdwLogin, false) showCursor(false)elseif (guiGetVisible(wdwLogin) == false) then guiSetVisible(wdwLogin, true) showCursor(true) endend function teleportPlayer(button,state) if button == "left" and state == "up" then if source == teleportButtonLS then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,0) outputChatBox("Welcome to the DE base") -- otherwise, if the player clicked on the SF teleport button elseif source == teleportButtonSF then -- trigger the server with our San Fierro coordinates triggerServerEvent("movePlayerToPosition",getLocalPlayer(),-2265.5,534.0,35.0,270) -- output a message to the player outputChatBox("Welcome to the Bikers base!") -- otherwise, if the player clicked on the LV teleport button elseif source == teleportButtonLV then -- trigger the server with our Las Venturas coordinates triggerServerEvent("movePlayerToPosition",getLocalPlayer(),2036.9,1545.2,10.8,270) -- output a message to the player outputChatBox("Wecome to the Navey's Ship!") end -- hide the window and all the components guiSetVisible(teleportWindow, false) -- hide the mouse cursor showCursor(false) end end addEventHandler( "onClientResourceStart" , getResourceRootElement(getThisResource()), privateclans)
-
erm no..... But did i mention that that script is the client side not the server side? Do i have to do somthink to the client side two?
-
erm no..... But did i mention that that script is the client side not the server side? Do i have to do somthink to the client side two?
-
Hey Im makeing a login gui and im have trouble with it. i need 2 set F2 to makea window appear... i have tryed and it doesent work ... look local localPlayer = getLocalPlayer() local localPlayerName = getPlayerName(localPlayer) local localRootElement = getRootElement() local newUser local passwordAttempts = 0 function CreateLoginWindow() wdwLogin = guiCreateWindow(226,146,372,233,"[Admin Login System]",false) guiWindowSetMovable(wdwLogin,false) guiWindowSetSizable(wdwLogin,false) tabpanel = guiCreateTabPanel(0.0242,0.0858,0.9489,0.8755,true,wdwLogin) tab1 = guiCreateTab("Login",tabpanel) login = guiCreateButton(0.1000,0.8611,0.2436,0.1167,"Login",true,tab1) username = guiCreateLabel(0.0113,0.1167,0.3768,0.15,"UserName:",true,tab1) guiLabelSetColor(username,255,255,255) guiLabelSetVerticalAlign(username,"top") guiLabelSetHorizontalAlign(username,"left",false) guiSetFont(username,"default-bold-small") password = guiCreateLabel(0.0113,0.2889,0.3768,0.15,"Password:",true,tab1) guiLabelSetColor(password,255,255,255) guiLabelSetVerticalAlign(password,"top") guiLabelSetHorizontalAlign(password,"left",false) guiSetFont(password,"default-bold-small") username = guiCreateEdit(0.2266,0.1,0.3598,0.1389,localPlayerName,true,tab1) password = guiCreateEdit(0.2266,0.2611,0.3598,0.1389,"",true,tab1) Canel = guiCreateButton( 0.4, 0.85, 0.20, 0.15, "Cancel", true,tab1 ) guiEditSetMasked(password,true) tab2 = guiCreateTab("Info",tabpanel) guiSetVisible(wdwLogin,false) addEventHandler("onClientGUIClick", Canel, closeWindow) end function Binds() bindKey( "F2", "down", CreateLoginWindow ) addEventHandler("onResourceStart", getRootElement(), Binds) end
-
Hey Im makeing a login gui and im have trouble with it. i need 2 set F2 to makea window appear... i have tryed and it doesent work ... look local localPlayer = getLocalPlayer() local localPlayerName = getPlayerName(localPlayer) local localRootElement = getRootElement() local newUser local passwordAttempts = 0 function CreateLoginWindow() wdwLogin = guiCreateWindow(226,146,372,233,"[Admin Login System]",false) guiWindowSetMovable(wdwLogin,false) guiWindowSetSizable(wdwLogin,false) tabpanel = guiCreateTabPanel(0.0242,0.0858,0.9489,0.8755,true,wdwLogin) tab1 = guiCreateTab("Login",tabpanel) login = guiCreateButton(0.1000,0.8611,0.2436,0.1167,"Login",true,tab1) username = guiCreateLabel(0.0113,0.1167,0.3768,0.15,"UserName:",true,tab1) guiLabelSetColor(username,255,255,255) guiLabelSetVerticalAlign(username,"top") guiLabelSetHorizontalAlign(username,"left",false) guiSetFont(username,"default-bold-small") password = guiCreateLabel(0.0113,0.2889,0.3768,0.15,"Password:",true,tab1) guiLabelSetColor(password,255,255,255) guiLabelSetVerticalAlign(password,"top") guiLabelSetHorizontalAlign(password,"left",false) guiSetFont(password,"default-bold-small") username = guiCreateEdit(0.2266,0.1,0.3598,0.1389,localPlayerName,true,tab1) password = guiCreateEdit(0.2266,0.2611,0.3598,0.1389,"",true,tab1) Canel = guiCreateButton( 0.4, 0.85, 0.20, 0.15, "Cancel", true,tab1 ) guiEditSetMasked(password,true) tab2 = guiCreateTab("Info",tabpanel) guiSetVisible(wdwLogin,false) addEventHandler("onClientGUIClick", Canel, closeWindow) end function Binds() bindKey( "F2", "down", CreateLoginWindow ) addEventHandler("onResourceStart", getRootElement(), Binds) end