#Paper Posted December 21, 2010 Posted December 21, 2010 How i can to import a function from server-side to client-side?
#Paper Posted December 21, 2010 Author 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.
12p Posted December 22, 2010 Posted December 22, 2010 If "active" means "alive", this will work: https://wiki.multitheftauto.com/wiki/GetAlivePlayers_%28Client%29
#Paper Posted December 24, 2010 Author 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?
Discord Moderators Zango Posted December 24, 2010 Discord Moderators 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
#Paper Posted December 25, 2010 Author 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
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