TheIceman1 Posted March 16, 2013 Posted March 16, 2013 How i can put all clans(data "clan") to grid list? Need paid scripter just pm me i will accept every job!
Renkon Posted March 16, 2013 Posted March 16, 2013 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)
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 (edited) Check on the forum for a example to add all the players in the gridListJust 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 March 16, 2013 by Guest Need paid scripter just pm me i will accept every job!
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 Nothing happens! Need paid scripter just pm me i will accept every job!
Castillo Posted March 16, 2013 Posted March 16, 2013 for _, playerclan in ipairs (clan) do "clan" is a table? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 yes? Need paid scripter just pm me i will accept every job!
Castillo Posted March 16, 2013 Posted March 16, 2013 Are you sure about that? show us where do you set the "clan" element data. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 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 ) Need paid scripter just pm me i will accept every job!
Castillo Posted March 16, 2013 Posted March 16, 2013 That's not a table, is a string. You are trying to get all clans that are currently playing on the server? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 No,i trying to put all made clans on grid list. Need paid scripter just pm me i will accept every job!
Castillo Posted March 16, 2013 Posted March 16, 2013 Where are you storing these clans? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 function createclan() setAccountData ( acc, "Clan", getElementData ( source, "clan" ) ) end addEvent ( "createclan", true ) addEventHandler ( "createclan", root, createclan ) Need paid scripter just pm me i will accept every job!
Castillo Posted March 16, 2013 Posted March 16, 2013 That's a problem, since you'll have to loop all accounts to get their clan data, then add them, and avoid adding duplicates. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TheIceman1 Posted March 16, 2013 Author Posted March 16, 2013 I dont understand. Need paid scripter just pm me i will accept every job!
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