Meshare Posted July 15, 2013 Share Posted July 15, 2013 hey all i want getAlivePlayers but in my team not all players in server function alive() local playersAlive = getAlivePlayers() -- i want all player in my team only . outputChatBox("Alive Players in you team : "..#playersAlive.."",source,255,255,0,true) end addEventHandler("onPlayerWasted",getRootElement(),alive) Link to comment
iMr.3a[Z]eF Posted July 15, 2013 Share Posted July 15, 2013 function getAlivePlayersInTeam(theTeam) local theTable = { } local players = getPlayersInTeam(theTeam) for i,v in pairs(players) do if not isPedDead(v) then theTable[#theTable+1]=v end end return theTable end Link to comment
Meshare Posted July 15, 2013 Author Share Posted July 15, 2013 function getAlivePlayersInTeam(theTeam) local theTable = { } local players = getPlayersInTeam(theTeam) for i,v in pairs(players) do if not isPedDead(v) then theTable[#theTable+1]=v end end return theTable end source : https://wiki.multitheftauto.com/wiki/Ge ... yersInTeam I did not search thank you . 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