#Paper Posted December 21, 2010 Share Posted December 21, 2010 How i can to import a function from server-side to client-side? Link to comment
12p Posted December 21, 2010 Share Posted December 21, 2010 What function do you want to "export"? Link to comment
nowofresh Posted December 21, 2010 Share Posted December 21, 2010 TriggerServerEvent... Link to comment
12p Posted December 21, 2010 Share Posted December 21, 2010 he doesn't mean that, if I'm right! Link to comment
#Paper Posted December 21, 2010 Author Share Posted December 21, 2010 he doesn't mean that, if I'm right! on race gm, race/modes/destructionderby.lua the function for get the activer players, i want export it on client side. Link to comment
12p Posted December 22, 2010 Share Posted December 22, 2010 If "active" means "alive", this will work: https://wiki.multitheftauto.com/wiki/GetAlivePlayers_%28Client%29 Link to comment
#Paper Posted December 24, 2010 Author Share Posted December 24, 2010 If "active" means "alive", this will work:https://wiki.multitheftauto.com/wiki/GetAlivePlayers_%28Client%29 it return the count or only the players name? Link to comment
Discord Moderators Zango Posted December 24, 2010 Discord Moderators Share Posted December 24, 2010 If "active" means "alive", this will work:https://wiki.multitheftauto.com/wiki/GetAlivePlayers_%28Client%29 it return the count or only the players name? it returns a table of all the alive player elements to get the count: alivePlayersCount = #getAlivePlayers() to get names in a table: function getAlivePlayerNames() local alivePlayers = getAlivePlayers() local playerNames = {} for i, v in ipairs (alivePlayers) do table.insert (playerNames, getPlayerName(v)) end return playerNames end Link to comment
#Paper Posted December 25, 2010 Author Share Posted December 25, 2010 If "active" means "alive", this will work:https://wiki.multitheftauto.com/wiki/GetAlivePlayers_%28Client%29 it return the count or only the players name? it returns a table of all the alive player elements to get the count: alivePlayersCount = #getAlivePlayers() to get names in a table: function getAlivePlayerNames() local alivePlayers = getAlivePlayers() local playerNames = {} for i, v in ipairs (alivePlayers) do table.insert (playerNames, getPlayerName(v)) end return playerNames end thanks Link to comment
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