Jump to content

Move to an arena problem


papam77

Recommended Posts

Hey, i have gamemode called [lobby] and i made functions for move to next gamemode called [race]

GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
    GUIEditor.button[1] = guiCreateButton(0.44, 0.31, 0.15, 0.24, "", true, player,"gamemode","race",true)     
    end 
) 

Why it can't join to race ?

Link to comment
Read the wiki !!

There is no argument for gamemode with the function guiCreateButton .

Now

  
GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
    GUIEditor.button[1] = setElementData, guiCreateButton (0.44, 0.31, 0.15, 0.24, "",true, player,"gamemode","deathmatch",true)     
    end 
) 

I added but still nothing

Link to comment
This make no sense at all you have to use it when player click it using : onClientGUIClick .
GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
    GUIEditor.button[1] = setElementData, guiCreateButton ("onClientGUIClick", 0.44, 0.31, 0.15, 0.24, "", true, player,"gamemode","deathmatch",true)     
    end 
) 

And now i can't see button

Link to comment

Try this and tell me if it output or no .

GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
    GUIEditor.button[1] = guiCreateButton ( 0.44, 0.31, 0.15, 0.24, "",true ) 
    addEventHandler("onClientGUIClick",GUIEditor.button[1],Click,false) 
    end 
) 
  
  
function Click( ) 
    setElementData(localPlayer,"gamemode","deathmatch",true)   
    outputChatBox( "* Data True !!",0,255,0 ) 
end 
  
Link to comment
Try this and tell me if it output or no .

GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
    GUIEditor.button[1] = guiCreateButton ( 0.44, 0.31, 0.15, 0.24, "",true ) 
    addEventHandler("onClientGUIClick",GUIEditor.button[1],Click,false) 
    end 
) 
  
  
function Click( ) 
    setElementData(localPlayer,"gamemode","deathmatch",true)   
    outputChatBox( "* Data True !!",0,255,0 ) 
end 
  

yes, output i see in chat *Data True

Link to comment
No -.- it's not right it's hard some what .

It's not easy ?

No it's not easy to make something like a "FFS Gaming" or "TG Gaming" ..etc You must be a good scripter.

And how can teach it good and fast ? Some tips ? How you started with lua ?

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...