freudo Posted October 4, 2014 Posted October 4, 2014 ı want list playerlist okey but list bug .D if playerlist then for id, player in ipairs(getElementsByType("player")) do local playerName = getPlayerName(player) local playerName = playerName:gsub("#%x%x%x%x%x%x", "") table.insert(players, playerName) end end WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
Castillo Posted October 4, 2014 Posted October 4, 2014 You mean that it adds a single player multiple times? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
freudo Posted October 4, 2014 Author Posted October 4, 2014 no, one player local players = {} dxDrawGridList( (screenW - 251) / 2, (screenH - 254) / 2, 251, 254, 8, 70, core.language.dxGui.gridlist, players, true, false) local playerlist = getElementData(core.language.dxGui.gridlist, "selected")[1] if playerlist then for id, player in ipairs(getElementsByType("player")) do local playerName = getPlayerName(player) local playerName = playerName:gsub("#%x%x%x%x%x%x", "") table.insert(players, playerName) end end WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
darhal Posted October 4, 2014 Posted October 4, 2014 First loop the table second make sure that the player is not the table using if ! #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
freudo Posted October 4, 2014 Author Posted October 4, 2014 can you help me? WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
darhal Posted October 4, 2014 Posted October 4, 2014 Sure if i dont help you so what i do ? for i, val in ipairs(players) do if val ~= playerName then table.insert(players, playerName) end end #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
freudo Posted October 4, 2014 Author Posted October 4, 2014 local players = getElementsByType("player") local playerName = getPlayerName(source) for i, val in ipairs(players) do if val ~= playerName then table.insert(players, playerName) end end nothing WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
darhal Posted October 4, 2014 Posted October 4, 2014 No added the part of the code after getPlayerName in the first code after line 9 #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
freudo Posted October 4, 2014 Author Posted October 4, 2014 please give me code for id, player in ipairs(getElementsByType("player")) do if player ~= playerName then table.insert(players, playerName) end local playerName = getPlayerName(player) local playerName = playerName:gsub("#%x%x%x%x%x%x", "") end WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
darhal Posted October 4, 2014 Posted October 4, 2014 Cant i use phone ! Listen first take the first code that you give it to us second copy my code third past it after line 9 just before table.insert in you first code #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
darhal Posted October 4, 2014 Posted October 4, 2014 Also dont forget to delete line 9 after all #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
freudo Posted October 4, 2014 Author Posted October 4, 2014 thanks WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
freudo Posted October 4, 2014 Author Posted October 4, 2014 yes work but have a problem lost button WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
darhal Posted October 4, 2014 Posted October 4, 2014 Nope post your new code #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
freudo Posted October 4, 2014 Author Posted October 4, 2014 for id, player in ipairs(getElementsByType("player")) do local playerName = getPlayerName(player) local playerName = playerName:gsub("#%x%x%x%x%x%x", "") table.insert(players, playerName) end for i, val in ipairs(getElementsByType("player")) do if val ~= playerName then table.insert(players, playerName) end end WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
darhal Posted October 4, 2014 Posted October 4, 2014 Delete line 4 and modify line 6 to for i, val in ipairs(players) do past the code that draw the grid #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
King12 Posted October 4, 2014 Posted October 4, 2014 May I know where did you get that dxGUI library from?
Anubhav Posted October 4, 2014 Posted October 4, 2014 Delete line 4 and modify line 6 to for i, val in ipairs(players) dopast the code that draw the grid Its obvious, it will draw the last player only! See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
freudo Posted October 5, 2014 Author Posted October 5, 2014 nothing for id, player in ipairs(getElementsByType("player")) do local playerName = getPlayerName(player) local playerName = playerName:gsub("#%x%x%x%x%x%x", "") end for i, val in ipairs(players) do if val ~= playerName then table.insert(players, playerName) end end WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
lcd1232 Posted October 5, 2014 Posted October 5, 2014 we can't solve your problem because u gave us code where button isn't created.
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