mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-18 20:22:53 +00:00
autoassign_team 1.0.0
This commit is contained in:
parent
c994eb4756
commit
6096379e3e
@ -6,6 +6,10 @@ Simple drag and drop scripts
|
||||
|
||||
Prevent players from hardscoping
|
||||
|
||||
## autoassign_team.gsc
|
||||
|
||||
Whenever a player connects directly autoassign him to a team, skipping the team selection menu
|
||||
|
||||
## change_team_names.gsc
|
||||
|
||||
Change the team names to custom names depending on the game mode
|
||||
|
31
small_scripts/autoassign_team.gsc
Normal file
31
small_scripts/autoassign_team.gsc
Normal file
@ -0,0 +1,31 @@
|
||||
Init()
|
||||
{
|
||||
InitTest();
|
||||
}
|
||||
|
||||
InitTest()
|
||||
{
|
||||
replacefunc(maps\mp\_utility::allowTeamChoice, ::ReplaceAllowTeamChoice);
|
||||
|
||||
level thread OnPlayerConnect();
|
||||
}
|
||||
|
||||
OnPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
|
||||
if (!IsDefined(player.pers["autoassign_connected"]) || !player.pers["autoassign_connected"])
|
||||
{
|
||||
player.pers["autoassign_connected"] = true;
|
||||
|
||||
player [[level.autoassign]]();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ReplaceAllowTeamChoice()
|
||||
{
|
||||
return false;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user