Jump to content

Question


TheIceman1

Recommended Posts

Check on the forum for a example to add all the players in the gridList

Just replace that example with some function where you get all the clans, add it to a table, and done with ipairs(table)

This doesnt work.No errors

function setclans () 
local clan = getElementData ( localPlayer, "clan" ) 
    for _, playerclan in ipairs (clan) do 
            local rowc = guiGridListAddRow ( GUIEditor_Grid[3] ) 
            guiGridListSetItemText ( GUIEditor_Grid[4], rowc, GUIEditor_Column[5], playerclan, false, false ) 
end 
end 
addCommandHandler ( "clans", setclans ) 

Edited by Guest
Link to comment

Here:

  
function createclan() 
local clan = guiGetText ( GUIEditor_Edit[1] ) 
setElementData ( localPlayer, "clan", clan ) 
 triggerServerEvent ( "createclan",localPlayer) 
    exports ["guimessages"] : outputClient ( "You create "..clan.." clan!", 255, 255, 0 ) 
end 
end 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], createclan ) 

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