damien111 Posted September 15, 2012 Share Posted September 15, 2012 Hello. I am VERY new to gui coding and i am trying to make a cheap,shitty, refrence spawn menu script. Can you help me out with why its not spawning the player when he presses button client GUIEditorTabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function createLoginWindow ( ) GUIEditor_Button[1] = guiCreateButton(547,87,5,5,"",false) GUIEditorTabPanel = guiCreateTabPanel(217,68,357,477,false) GUIEditor_Tab[1] = guiCreateTab("Police",GUIEditorTabPanel) SCLVSPAWN = guiCreateButton(14,81,128,40,"Police Officer - LV",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(14,121,129,40,"Police Officer - SF",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(14,62,172,33,"Standard Police Officers",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(442,80,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(14,165,172,33,"Police Groups/Squads",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(14,185,129,40,"San Andreas State Trooper",false,GUIEditor_Tab[1]) GUIEditor_Memo[1] = guiCreateMemo(175,40,164,223,"The Law Enforcment of San Andreas. They can arrest by hitting a wanted person with a nightstick.",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Civlian",GUIEditorTabPanel) GUIEditor_Button[6] = guiCreateButton(23,20,128,35,"CJ Skin (Customizable)",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(23,66,128,35,"Asian",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(23,115,128,35,"Black Guy",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(46,134,5,5,"",false,GUIEditor_Button[8]) GUIEditor_Button[10] = guiCreateButton(23,164,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(23,213,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Memo[2] = guiCreateMemo(172,15,165,248,"As A Civlian You Can Get Jobs To Make Money For Cars, Drugs, Guns, Houses, and more. Please Note That The Clothes Are For The CJ Skin Only",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Gov.",GUIEditorTabPanel) GUIEditor_Button[12] = guiCreateButton(25,43,149,52,"President Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[13] = guiCreateButton(25,97,149,52,"Vice-Prez Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[14] = guiCreateButton(25,151,149,52,"Mayor",false,GUIEditor_Tab[3]) GUIEditor_Button[15] = guiCreateButton(33,120,5,5,"",false,GUIEditor_Button[14]) GUIEditor_Button[16] = guiCreateButton(25,205,149,52,"Chief of Police",false,GUIEditor_Tab[3]) GUIEditor_Button[17] = guiCreateButton(25,291,149,52,"Secret Service",false,GUIEditor_Tab[3]) GUIEditor_Button[18] = guiCreateButton(25,344,149,52,"Security Task Force",false,GUIEditor_Tab[3]) GUIEditor_Label[3] = guiCreateLabel(76,34,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(97,117,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[5] = guiCreateLabel(27,20,114,18,"Goverment Officials",false,GUIEditor_Tab[3]) GUIEditor_Label[6] = guiCreateLabel(27,271,114,18,"Govermant Security",false,GUIEditor_Tab[3]) GUIEditor_Memo[3] = guiCreateMemo(182,18,164,251,"The people who run and keep San Andreas clean and safe.",false,GUIEditor_Tab[3]) GUIEditor_Memo[4] = guiCreateMemo(188,283,156,115,"The security units to protect the goverment!",false,GUIEditor_Tab[3]) guiSetVisible( GUIEditorTabPanel, true ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), createLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() end ) function spawnpolice1 ( ) triggerServerEvent ( "Testers", source ) end addEventHandler("onClientGUIClick",SCLVSPAWN,spawnpolice1,false) server teamFreeroamers = createTeam ( "Admins", 200, 200, 200 ) function greetPlayer ( ) triggerClientEvent ( "onGreeting", getRootElement()) showCursor ( source, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) function greetingCommand ( ) -- getLocalPlayer instead of getRootElement makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end function greetingHandler ( message ) spawnPlayer (source, 2005, 1543, 13.590750694275, 0, 207, 0, 0, "Admins") end addEvent( "Testers", true ) addEventHandler( "Testers", source(), greetingHandler ) "Damien" name="sccript" version="1.0" type="script"/> Link to comment
Castillo Posted September 15, 2012 Share Posted September 15, 2012 Here: triggerServerEvent ( "Testers", source ) "source" of: "onClientGUIClick" is the element clicked, you must use "localPlayer" instead. And in the server side: function greetingHandler ( message ) spawnPlayer (source, 2005, 1543, 13.590750694275, 0, 207, 0, 0, "Admins") end addEvent( "Testers", true ) addEventHandler( "Testers", source(), greetingHandler ) What is "source()" doing there? it makes no sense. Replace it with "root". P.S: spawnPlayer requires a team element, so you must use: getTeamFromName ( "Admins" ) Link to comment
damien111 Posted September 15, 2012 Author Share Posted September 15, 2012 Ok i did everything but the team thing. I do not understand what you mean Link to comment
Castillo Posted September 15, 2012 Share Posted September 15, 2012 Instead of: "Admins" at "spawnPlayer" you put: getTeamFromName ( "Admins" ) Link to comment
damien111 Posted September 15, 2012 Author Share Posted September 15, 2012 Still will not let me spawn: Server teamFreeroamers = createTeam ( "Admins", 200, 200, 200 ) function greetPlayer ( ) triggerClientEvent ( "onGreeting", getRootElement()) showCursor ( source, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) function greetingCommand ( ) -- getLocalPlayer instead of getRootElement makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end function greetingHandler ( message ) spawnPlayer (source, 2005, 1543, 13.590750694275, 0, 207, 0, 0, getTeamFromName ( "Admins" )) end addEvent( "Testers", true ) addEventHandler( "Testers", source(), greetingHandler ) Client GUIEditorTabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function createLoginWindow ( ) GUIEditor_Button[1] = guiCreateButton(547,87,5,5,"",false) GUIEditorTabPanel = guiCreateTabPanel(217,68,357,477,false) GUIEditor_Tab[1] = guiCreateTab("Police",GUIEditorTabPanel) SCLVSPAWN = guiCreateButton(14,81,128,40,"Police Officer - LV",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(14,121,129,40,"Police Officer - SF",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(14,62,172,33,"Standard Police Officers",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(442,80,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(14,165,172,33,"Police Groups/Squads",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(14,185,129,40,"San Andreas State Trooper",false,GUIEditor_Tab[1]) GUIEditor_Memo[1] = guiCreateMemo(175,40,164,223,"The Law Enforcment of San Andreas. They can arrest by hitting a wanted person with a nightstick.",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Civlian",GUIEditorTabPanel) GUIEditor_Button[6] = guiCreateButton(23,20,128,35,"CJ Skin (Customizable)",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(23,66,128,35,"Asian",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(23,115,128,35,"Black Guy",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(46,134,5,5,"",false,GUIEditor_Button[8]) GUIEditor_Button[10] = guiCreateButton(23,164,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(23,213,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Memo[2] = guiCreateMemo(172,15,165,248,"As A Civlian You Can Get Jobs To Make Money For Cars, Drugs, Guns, Houses, and more. Please Note That The Clothes Are For The CJ Skin Only",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Gov.",GUIEditorTabPanel) GUIEditor_Button[12] = guiCreateButton(25,43,149,52,"President Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[13] = guiCreateButton(25,97,149,52,"Vice-Prez Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[14] = guiCreateButton(25,151,149,52,"Mayor",false,GUIEditor_Tab[3]) GUIEditor_Button[15] = guiCreateButton(33,120,5,5,"",false,GUIEditor_Button[14]) GUIEditor_Button[16] = guiCreateButton(25,205,149,52,"Chief of Police",false,GUIEditor_Tab[3]) GUIEditor_Button[17] = guiCreateButton(25,291,149,52,"Secret Service",false,GUIEditor_Tab[3]) GUIEditor_Button[18] = guiCreateButton(25,344,149,52,"Security Task Force",false,GUIEditor_Tab[3]) GUIEditor_Label[3] = guiCreateLabel(76,34,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(97,117,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[5] = guiCreateLabel(27,20,114,18,"Goverment Officials",false,GUIEditor_Tab[3]) GUIEditor_Label[6] = guiCreateLabel(27,271,114,18,"Govermant Security",false,GUIEditor_Tab[3]) GUIEditor_Memo[3] = guiCreateMemo(182,18,164,251,"The people who run and keep San Andreas clean and safe.",false,GUIEditor_Tab[3]) GUIEditor_Memo[4] = guiCreateMemo(188,283,156,115,"The security units to protect the goverment!",false,GUIEditor_Tab[3]) guiSetVisible( GUIEditorTabPanel, true ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), createLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() end ) function spawnpolice1 ( ) triggerServerEvent ( "Testers", localPlayer ) end addEventHandler("onClientGUIClick",SCLVSPAWN,spawnpolice1,false) Link to comment
Castillo Posted September 15, 2012 Share Posted September 15, 2012 Debugscript errors? Link to comment
damien111 Posted September 15, 2012 Author Share Posted September 15, 2012 WARNING: TestPanel24\Client.lua:52:Bad Argument@ AddEventHandler [ Expected Elment at Argument2,gotnil.] Link to comment
Castillo Posted September 15, 2012 Share Posted September 15, 2012 Place: addEventHandler("onClientGUIClick",SCLVSPAWN,spawnpolice1,false) Inside the: "createLoginWindow" function. Link to comment
damien111 Posted September 15, 2012 Author Share Posted September 15, 2012 It isnt doing what it suppuse to do. I need it to spawn the player >< But i cant get it to do that.. Link to comment
damien111 Posted September 15, 2012 Author Share Posted September 15, 2012 Nothing! I Click The Button and it just, does nothing. You want to check it out on my server? Or. What. Link to comment
Castillo Posted September 15, 2012 Share Posted September 15, 2012 teamFreeroamers = createTeam ( "Admins", 200, 200, 200 ) function greetPlayer ( ) triggerClientEvent ( "onGreeting", getRootElement()) showCursor ( source, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) function greetingCommand ( ) -- getLocalPlayer instead of getRootElement makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end function greetingHandler ( message ) spawnPlayer (source, 2005, 1543, 13.590750694275, 0, 207, 0, 0, getTeamFromName ( "Admins" )) end addEvent( "Testers", true ) addEventHandler( "Testers", source(), greetingHandler ) That's wrong, I told you to replace: "source()" with "root". Link to comment
damien111 Posted September 15, 2012 Author Share Posted September 15, 2012 Still Is Not Spawning The player Server teamFreeroamers = createTeam ( "Admins", 200, 200, 200 ) function greetPlayer ( ) triggerClientEvent ( "onGreeting", getRootElement()) showCursor ( source, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) function greetingCommand ( ) -- getLocalPlayer instead of getRootElement makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end function greetingHandler ( message ) spawnPlayer (source, 2005, 1543, 13.590750694275, 0, 207, 0, 0, getTeamFromName ( "Admins" )) end addEvent( "Testers", true ) addEventHandler( "Testers", root, greetingHandler ) Client GUIEditorTabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function createLoginWindow ( ) GUIEditor_Button[1] = guiCreateButton(547,87,5,5,"",false) GUIEditorTabPanel = guiCreateTabPanel(217,68,357,477,false) GUIEditor_Tab[1] = guiCreateTab("Police",GUIEditorTabPanel) SCLVSPAWN = guiCreateButton(14,81,128,40,"Police Officer - LV",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(14,121,129,40,"Police Officer - SF",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(14,62,172,33,"Standard Police Officers",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(442,80,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(14,165,172,33,"Police Groups/Squads",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(14,185,129,40,"San Andreas State Trooper",false,GUIEditor_Tab[1]) GUIEditor_Memo[1] = guiCreateMemo(175,40,164,223,"The Law Enforcment of San Andreas. They can arrest by hitting a wanted person with a nightstick.",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Civlian",GUIEditorTabPanel) GUIEditor_Button[6] = guiCreateButton(23,20,128,35,"CJ Skin (Customizable)",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(23,66,128,35,"Asian",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(23,115,128,35,"Black Guy",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(46,134,5,5,"",false,GUIEditor_Button[8]) GUIEditor_Button[10] = guiCreateButton(23,164,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(23,213,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Memo[2] = guiCreateMemo(172,15,165,248,"As A Civlian You Can Get Jobs To Make Money For Cars, Drugs, Guns, Houses, and more. Please Note That The Clothes Are For The CJ Skin Only",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Gov.",GUIEditorTabPanel) GUIEditor_Button[12] = guiCreateButton(25,43,149,52,"President Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[13] = guiCreateButton(25,97,149,52,"Vice-Prez Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[14] = guiCreateButton(25,151,149,52,"Mayor",false,GUIEditor_Tab[3]) GUIEditor_Button[15] = guiCreateButton(33,120,5,5,"",false,GUIEditor_Button[14]) GUIEditor_Button[16] = guiCreateButton(25,205,149,52,"Chief of Police",false,GUIEditor_Tab[3]) GUIEditor_Button[17] = guiCreateButton(25,291,149,52,"Secret Service",false,GUIEditor_Tab[3]) GUIEditor_Button[18] = guiCreateButton(25,344,149,52,"Security Task Force",false,GUIEditor_Tab[3]) GUIEditor_Label[3] = guiCreateLabel(76,34,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(97,117,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[5] = guiCreateLabel(27,20,114,18,"Goverment Officials",false,GUIEditor_Tab[3]) GUIEditor_Label[6] = guiCreateLabel(27,271,114,18,"Govermant Security",false,GUIEditor_Tab[3]) GUIEditor_Memo[3] = guiCreateMemo(182,18,164,251,"The people who run and keep San Andreas clean and safe.",false,GUIEditor_Tab[3]) GUIEditor_Memo[4] = guiCreateMemo(188,283,156,115,"The security units to protect the goverment!",false,GUIEditor_Tab[3]) guiSetVisible( GUIEditorTabPanel, true ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), createLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() addEventHandler("onClientGUIClick",SCLVSPAWN,spawnpolice1,false) end ) function spawnpolice1 ( ) triggerServerEvent ( "Testers", localPlayer ) end [/lua] Link to comment
damien111 Posted September 16, 2012 Author Share Posted September 16, 2012 (edited) Working, THanks! Edited September 16, 2012 by Guest Link to comment
Castillo Posted September 16, 2012 Share Posted September 16, 2012 I used the latest code you posted. Link to comment
damien111 Posted September 16, 2012 Author Share Posted September 16, 2012 Now i cant get it to pop up when a player dies. I used onPlayerWasted.. Server: teamFreeroamers = createTeam ( "Admins", 200, 200, 200 ) function greetPlayer ( ) triggerClientEvent ( "onGreeting", getRootElement()) showCursor ( source, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) function greetingCommand ( ) -- getLocalPlayer instead of getRootElement makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end function greetingHandler ( message ) spawnPlayer (source, 2005, 1543, 13.590750694275, 0, 207, 0, 0, getTeamFromName ( "Admins" )) end addEvent( "Testers", true ) addEventHandler( "Testers", root, greetingHandler ) function bringUp ( ) triggerClientEvent( "onDeath", getRootElement()) showCursor ( source, true) end addEventHandler ( "onPlayerWasted", getRootElement(), bringUp ) CLient: GUIEditorTabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function createLoginWindow ( ) GUIEditor_Button[1] = guiCreateButton(547,87,5,5,"",false) GUIEditorTabPanel = guiCreateTabPanel(217,68,357,477,false) GUIEditor_Tab[1] = guiCreateTab("Police",GUIEditorTabPanel) SCLVSPAWN = guiCreateButton(14,81,128,40,"Police Officer - LV",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(14,121,129,40,"Police Officer - SF",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(14,62,172,33,"Standard Police Officers",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(442,80,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(14,165,172,33,"Police Groups/Squads",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(14,185,129,40,"San Andreas State Trooper",false,GUIEditor_Tab[1]) GUIEditor_Memo[1] = guiCreateMemo(175,40,164,223,"The Law Enforcment of San Andreas. They can arrest by hitting a wanted person with a nightstick.",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Civlian",GUIEditorTabPanel) GUIEditor_Button[6] = guiCreateButton(23,20,128,35,"CJ Skin (Customizable)",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(23,66,128,35,"Asian",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(23,115,128,35,"Black Guy",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(46,134,5,5,"",false,GUIEditor_Button[8]) GUIEditor_Button[10] = guiCreateButton(23,164,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(23,213,128,35,"Mexican",false,GUIEditor_Tab[2]) GUIEditor_Memo[2] = guiCreateMemo(172,15,165,248,"As A Civlian You Can Get Jobs To Make Money For Cars, Drugs, Guns, Houses, and more. Please Note That The Clothes Are For The CJ Skin Only",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Gov.",GUIEditorTabPanel) GUIEditor_Button[12] = guiCreateButton(25,43,149,52,"President Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[13] = guiCreateButton(25,97,149,52,"Vice-Prez Of San Andreas",false,GUIEditor_Tab[3]) GUIEditor_Button[14] = guiCreateButton(25,151,149,52,"Mayor",false,GUIEditor_Tab[3]) GUIEditor_Button[15] = guiCreateButton(33,120,5,5,"",false,GUIEditor_Button[14]) GUIEditor_Button[16] = guiCreateButton(25,205,149,52,"Chief of Police",false,GUIEditor_Tab[3]) GUIEditor_Button[17] = guiCreateButton(25,291,149,52,"Secret Service",false,GUIEditor_Tab[3]) GUIEditor_Button[18] = guiCreateButton(25,344,149,52,"Security Task Force",false,GUIEditor_Tab[3]) GUIEditor_Label[3] = guiCreateLabel(76,34,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(97,117,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[5] = guiCreateLabel(27,20,114,18,"Goverment Officials",false,GUIEditor_Tab[3]) GUIEditor_Label[6] = guiCreateLabel(27,271,114,18,"Govermant Security",false,GUIEditor_Tab[3]) GUIEditor_Memo[3] = guiCreateMemo(182,18,164,251,"The people who run and keep San Andreas clean and safe.",false,GUIEditor_Tab[3]) GUIEditor_Memo[4] = guiCreateMemo(188,283,156,115,"The security units to protect the goverment!",false,GUIEditor_Tab[3]) guiSetVisible( GUIEditorTabPanel, true ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), createLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() addEventHandler("onClientGUIClick",SCLVSPAWN,spawnpolice1,false) end ) function onDeath ( ) guiSetVisible( GUIEditorTabPanel, false ) end addEvent( "onDeath", true ) addEventHandler( "onDeath", getRootElement(), onDeath ) function spawnpolice1 ( ) triggerServerEvent ( "Testers", localPlayer ) guiSetVisible( GUIEditorTabPanel, false ) end Link to comment
Castillo Posted September 16, 2012 Share Posted September 16, 2012 Maybe because you set it to hide it instead of showing it? guiSetVisible( GUIEditorTabPanel, false ) Should be: guiSetVisible ( GUIEditorTabPanel, true ) Link to comment
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