toptional Posted November 13, 2012 Posted November 13, 2012 Whats wrong with this , Its something sooo easy i just cant figure out whats wrong URGGG!! GUIEditor_Button[1] = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!",false,GUIEditor_Window[2]) button = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!",true ) addEventHandler('onClientGUIClick', button, function () setElementPosition ( localPlayer, 1679.3029785156, 1446.3712158203, 11.043098449707 ) end )
Castillo Posted November 13, 2012 Posted November 13, 2012 So, what is the problem? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted November 13, 2012 Posted November 13, 2012 button = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!",true) Should be: button = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!", false) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
toptional Posted November 13, 2012 Author Posted November 13, 2012 button = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!",true) Should be: button = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!", false) Awesome as ever Thanks
toptional Posted November 13, 2012 Author Posted November 13, 2012 Just tested it nope dont work The Button appears somewhere random as soon as i connect and the spawning doesnt work Heres the full script if you need it Client spawnmarker = createMarker ( 1969.9000244141, -1517.8000488281, 970.79998779297 , "cylinder", 2, 9, 30, 213, 255 ) function MarkerHit ( hitPlayer, matchingDimension ) guiSetVisible ( GUIEditor_Window[2], true ) outputChatBox ( getPlayerName ( hitPlayer ) .." entered a marker" ) end addEventHandler ( "onClientMarkerHit", spawnmarker, MarkerHit ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[2] = guiCreateWindow(147,141,749,548,"The Aviator Spawn Panel by Robbster",false) guiSetVisible ( GUIEditor_Window[2], false ) GUIEditor_Memo[2] = guiCreateMemo(80,56,627,302,'Welcome to to the Aviators Airline Gamemode!t\n\n-----\nINFO\nINFO \nINFO\nINFO\n-------\n\nHere are the ranks\n\nA student pilot is 0 points : These can fly everything except the Andromada, AT-400, military planes and military helicopters (hydra/hunter)\n\nA Private pilot is 150 points : These can fly everything except the Andromada and AT-400, and military planes and helicopters (hydra/hunter) and flying with the shamal will be x1.5 the amount of money a student pilot earns\n\nA Commercial pilot is 250 points : These can fly everything except the military planes and helicopters (hydra/hunter)\n\nArmy pilots is 500 points : These can fly everything\nIn an airline, all airplanes of the airline can be used not matter what \"level\" you are.',false,GUIEditor_Window[2]) GUIEditor_Label[1] = guiCreateLabel(270,398,94,46,"",false,GUIEditor_Window[2]) GUIEditor_Button[1] = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!",false,GUIEditor_Window[2]) button = guiCreateButton(280,401,194,92,"Lets get to Work Pilot!",false ) addEventHandler('onClientGUIClick', button, function () setElementPosition ( localPlayer, 1679.3029785156, 1446.3712158203, 11.043098449707 ) end ) Server ---Spawning the player to the Spawn Room--- function spawn ( ) spawnPlayer ( source , 1958.7082519531, -1517.5471191406, 973.55889892578, 0, 1, 0, 0 ) end addEventHandler ( 'onPlayerLogin', getRootElement(), spawn )
Castillo Posted November 13, 2012 Posted November 13, 2012 I tested it before post, it set my position. You are already spawned, right? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
toptional Posted November 13, 2012 Author Posted November 13, 2012 I tested it before post, it set my position.You are already spawned, right? You Spawn the login Panel shows , then get spawned the this room and enter the marker and then clicking the button doesnt get you spawned to the new location D:
Castillo Posted November 13, 2012 Posted November 13, 2012 Debug errors? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Renkon Posted November 13, 2012 Posted November 13, 2012 addEventHandler('onClientGUIClick', button, function (b) if b == "left" then setElementPosition ( localPlayer, 1679.3029785156, 1446.3712158203, 11.043098449707 ) end end )
toptional Posted November 14, 2012 Author Posted November 14, 2012 addEventHandler('onClientGUIClick', button, function (b) if b == "left" then setElementPosition ( localPlayer, 1679.3029785156, 1446.3712158203, 11.043098449707 ) end end ) Still Doesnt Work
Castillo Posted November 14, 2012 Posted November 14, 2012 addEventHandler ( 'onClientGUIClick', button, function ( ) setElementPosition ( localPlayer, 1679.3029785156, 1446.3712158203, 11.043098449707 ) outputChatBox ( "Button clicked" ) end ) See what it outputs to chat. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
toptional Posted November 14, 2012 Author Posted November 14, 2012 addEventHandler ( 'onClientGUIClick', button, function ( ) setElementPosition ( localPlayer, 1679.3029785156, 1446.3712158203, 11.043098449707 ) outputChatBox ( "Button clicked" ) end ) See what it outputs to chat. Nothing Comes in the chat Box, The Spawning dont work
Castillo Posted November 14, 2012 Posted November 14, 2012 Has to be something on your side, because I just copied your client script and worked. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted November 14, 2012 Posted November 14, 2012 addEventHandler("onClientGUIClick", root, function (button, state, absoluteX, absoluteY) if source == Your Button then setElementPosition(localPlayer,x,y,z) end end)
toptional Posted November 14, 2012 Author Posted November 14, 2012 Has to be something on your side, because I just copied your client script and worked. Open up a local test server and show me please, Seriously it just wont work for me! PM me the IP ! Thanks
Castillo Posted November 14, 2012 Posted November 14, 2012 The problem has been solved. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now