Jump to content

Marker


Spice

Recommended Posts

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

Link to comment

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 
  

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...