03-15-2009, 03:46 PM | #1 |
Banned
Join Date: Sep 2008
Class/Position: Soldier Gametype: AVD Affiliations: TALOS Posts Rated Helpful 5 Times
|
A few more questions.
I need (if possible) a lua function that:
Second, how do I check the player-count for a team? Last, how do I move a single player to another team? Thanks in advance. |
|
03-15-2009, 08:59 PM | #2 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Forces all players to spectator:
Code:
ApplyToAll({ AT.kChangeTeamSpectator }) Code:
local c = Collection() c:GetByFilter( {CF.kPlayers, CF.kTeamSpectator} ) local count = c:Count() local randomplayer = math.random(1, count) local player = c:Element( randomplayer ) ApplyToPlayer( player, { AT.kChangeTeamBlue } ) Code:
local team = GetTeam( Team.kBlue ) local numplayers = team:GetNumPlayers() Code:
ApplyToPlayer( player, { AT.kChangeTeamBlue, AT.kRespawnPlayers } )
__________________
#FF.Pickup ยค Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|