S3Nn4oXx Posted September 24, 2015 Share Posted September 24, 2015 Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone createColRectangle Link to comment
KariiiM Posted September 24, 2015 Share Posted September 24, 2015 You want to create a colShap with cmd at your position or what? Link to comment
S3Nn4oXx Posted September 24, 2015 Author Share Posted September 24, 2015 You want to create a colShap with cmd at your position or what? "Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone" There is three editboxes of Y: X: Z: I just need to fill it then it creates the warzone there Link to comment
KariiiM Posted September 24, 2015 Share Posted September 24, 2015 You want to create a colShap with cmd at your position or what? "Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone" Click on the function there's an example read it and try to make it ,if you failed post the code Link to comment
S3Nn4oXx Posted September 25, 2015 Author Share Posted September 25, 2015 You want to create a colShap with cmd at your position or what? "Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone" Click on the function there's an example read it and try to make it ,if you failed post the code "attempt to call global 'guiGetScreenSize' (a nil value)" Line: local screenW, screenH = guiGetScreenSize() Server.lua GUIEditor = { button = {}, window = {}, edit = {}, label = {} } function gui( ) local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 282) / 2, (screenH - 92) / 2, 282, 92, "WarZone Control ", false) guiWindowSetSizable(window, false) create = guiCreateButton(114, 64, 54, 18, "Create", false, window) guiSetProperty(create, "NormalTextColour", "FFAAAAAA") yt = guiCreateLabel(10, 36, 44, 25, "Y:", false, window) boxe = guiCreateEdit(33, 33, 57, 21, "", false, window) xt = guiCreateLabel(100, 36, 21, 18, "X:", false, window) boxe1 = guiCreateEdit(121, 33, 57, 21, "", false, window) zt = guiCreateLabel(188, 36, 21, 18, "Z:", false, window) boxe2 = guiCreateEdit(209, 33, 57, 21, "", false, window) addEventHandler ( "onClientGUIClick", create, setZone, false ) end addCommandHandler( "warzone", gui ) function setZone ( playerSource, fX, fY ) if ( fY and fX ) then local tempCol = createColRectangle ( fX, fY, 10.0, 10.0 ) if ( tempCol == false ) then else if ( theZone ~= false ) then destroyElement ( theZone ) end theZone = tempCol end end end and GUI I can make it only in Client side, how do i make it in server side? Link to comment
TAPL Posted September 25, 2015 Share Posted September 25, 2015 Put client and server side functions on its own side. Use trigger to make client - server side communication. triggerServerEvent triggerClientEvent Link to comment
S3Nn4oXx Posted September 25, 2015 Author Share Posted September 25, 2015 Put client and server side functions on its own side. Use trigger to make client - server side communication. triggerServerEvent triggerClientEvent It's my first time that I'm using it '-' server.lua: function awe ( playerSource, fX, fY ) if ( fY and fX ) then local tempCol = createColRectangle ( fX, fY, 10.0, 10.0 ) if ( tempCol == false ) then else if ( theZone ~= false ) then destroyElement ( theZone ) end theZone = tempCol end end end addEvent( "zone", true ) addEventHandler( "zone", resourceRoot, awe ) client.lua: GUIEditor = { button = {}, window = {}, edit = {}, label = {} } function gui( ) local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 282) / 2, (screenH - 92) / 2, 282, 92, "WarZone Control ", false) guiWindowSetSizable(window, false) create = guiCreateButton(114, 64, 54, 18, "Create", false, window) guiSetProperty(create, "NormalTextColour", "FFAAAAAA") yt = guiCreateLabel(10, 36, 44, 25, "Y:", false, window) boxe = guiCreateEdit(33, 33, 57, 21, "", false, window) xt = guiCreateLabel(100, 36, 21, 18, "X:", false, window) boxe1 = guiCreateEdit(121, 33, 57, 21, "", false, window) zt = guiCreateLabel(188, 36, 21, 18, "Z:", false, window) boxe2 = guiCreateEdit(209, 33, 57, 21, "", false, window) addEventHandler ( "onClientGUIClick", create, setZone, false ) end addCommandHandler( "warzone", gui ) function setZone( ) triggerServerEvent ( "zone", resourceRoot ) end How can i make it in client.lua ? local screenW, screenH = guiGetScreenSize() ERROR 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