Spice Posted June 28, 2015 Posted June 28, 2015 function clos ( ) guiSetVisible (Wind, false) showCursor ( false, false ) end function creat ( ) x, y, z = getElementPosition ( localPlayer ) types = guiComboBoxGetSelected ( Types ) size = guiGetText ( Size ) R = guiGetText ( ColorR ) G = guiGetText ( ColorG ) B = guiGetText ( ColorB ) alpha = guiGetText ( Alpha ) alpha = guiGetText ( Alpha ) mc = createMarker ( x, y, z, types, size, R, G, B, alpha ) if ( mc ) then outputChatBox ( "Marker created successfully" ) else outputChatBox ( "Error" ) end end function gui () Wind = guiCreateWindow(399, 210, 243, 248, "Create Marker", false) guiWindowSetSizable(Wind, false) Types = guiCreateComboBox(78, 32, 155, 98, "Corona", false, Wind) guiComboBoxAddItem(Types, "Arrow") guiComboBoxAddItem(Types, "Cylinder") guiComboBoxAddItem(Types, "Check Point") guiComboBoxAddItem(Types, "Corona") guiComboBoxAddItem(Types, "Ring") lab = guiCreateLabel(9, 36, 69, 18, "Marker Type", false, Wind) lab2 = guiCreateLabel(9, 84, 69, 18, "Marker Size", false, Wind) Size = guiCreateMemo(78, 74, 155, 31, "From 1 to 10", false, Wind) lab3 = guiCreateLabel(10, 130, 69, 18, "Marker Color", false, Wind) ColorR = guiCreateMemo(79, 120, 35, 31, "R", false, Wind) ColorG = guiCreateMemo(118, 120, 39, 31, "G", false, Wind) ColorB = guiCreateMemo(160, 120, 39, 31, "B", false, Wind) lab4 = guiCreateLabel(9, 173, 69, 18, "Marker Alpha", false, Wind) Alpha = guiCreateMemo(79, 170, 154, 31, "From 0 to 250", false, Wind) Create = guiCreateButton(10, 209, 94, 29, "Create", false, Wind) addEventHandler ( "onClientGUIClick", Create, creat, false ) Close = guiCreateButton(129, 209, 94, 29, "Close", false, Wind) addEventHandler ( "onClientGUIClick", Close, clos, false ) ------------------------------------------------------------------------------- showCursor ( true ) end addCommandHandler ( "cm", gui, false ) Hello i made this script it's a gui which creates a marker on the player location he has also to fill some options but it don't create marker when i fill the options
Walid Posted June 28, 2015 Posted June 28, 2015 Hello i made this script it's a gui which creates a marker on the player location he has also to fill some options but it don't create marker when i fill the options Try this it should work. addEventHandler("onClientResourceStart",resourceRoot, function() Wind = guiCreateWindow(399, 210, 243, 248, "Create Marker", false) guiWindowSetSizable(Wind, false) guiSetVisible(Wind, false) Types = guiCreateComboBox(78, 32, 155, 98, "Corona", false, Wind) guiComboBoxAddItem(Types, "Arrow") guiComboBoxAddItem(Types, "Cylinder") guiComboBoxAddItem(Types, "Check Point") guiComboBoxAddItem(Types, "Corona") guiComboBoxAddItem(Types, "Ring") lab = guiCreateLabel(9, 36, 69, 18, "Marker Type", false, Wind) lab2 = guiCreateLabel(9, 84, 69, 18, "Marker Size", false, Wind) Size = guiCreateMemo(78, 74, 155, 31, "From 1 to 10", false, Wind) lab3 = guiCreateLabel(10, 130, 69, 18, "Marker Color", false, Wind) ColorR = guiCreateMemo(79, 120, 35, 31, "R", false, Wind) ColorG = guiCreateMemo(118, 120, 39, 31, "G", false, Wind) ColorB = guiCreateMemo(160, 120, 39, 31, "B", false, Wind) lab4 = guiCreateLabel(9, 173, 69, 18, "Marker Alpha", false, Wind) Alpha = guiCreateMemo(79, 170, 154, 31, "From 0 to 250", false, Wind) Create = guiCreateButton(10, 209, 94, 29, "Create", false, Wind) Close = guiCreateButton(129, 209, 94, 29, "Close", false, Wind) addEventHandler ( "onClientGUIClick", Create, creat, false ) addEventHandler ( "onClientGUIClick", Close, clos, false ) end ) function OpenGui() guiSetVisible(Wind, not guiGetVisible(Wind)) showCursor(guiGetVisible(Wind)) end addCommandHandler ( "cm",OpenGui) function clos ( ) guiSetVisible (Wind, false) showCursor (false) end function creat ( ) local x, y, z = getElementPosition ( localPlayer ) local types = guiComboBoxGetSelected ( Types ) local size = guiGetText ( Size ) local r, g, b, a = guiGetText ( ColorR ), guiGetText ( ColorG ), guiGetText ( ColorB ), guiGetText ( Alpha ) local mc = createMarker ( x, y, z, types, size, r, g, b, a ) if ( mc ) then outputChatBox ( "Marker created successfully" ) else outputChatBox ( "Error" ) end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Spice Posted June 28, 2015 Author Posted June 28, 2015 Thanks working any idea about how to make the marker gets saved ?
Walid Posted June 28, 2015 Posted June 28, 2015 Thanks working any idea about how to make the marker gets saved ? You need to use Databases (MySQL or SQLite). Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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