AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   team Player is Spectator (https://forums.alliedmods.net/showthread.php?t=208965)

Sutar 02-19-2013 13:50

team Player is Spectator
 
How to make it so that when a player is entering the server and he was in command of Spectator?

Here's the script:
HTML Code:

#include <amxmodx>
#include <cstrike>

public plugin_init()
        register_plugin("test", "0.0", "Author")

public client_putinserver(id)
{
        engclient_cmd(id, "jointeam", "6")
        engclient_cmd(id, "specmode", "1")
        engclient_cmd(id, "chooseteam", "1")
}

But the problem is this:
1. No first MOTD window.
2. No window to select the class (and should not open it)
How to do it right?

Napoleon_be 02-19-2013 13:57

Re: team Player is Spectator
 
you should use the cstrike module & use cs_set_user_team() on Spawn.

Torge 02-19-2013 14:19

Re: team Player is Spectator
 
Not sure whether this can work directly.

To be safe, you could use a task!

Sutar 02-19-2013 15:39

Re: team Player is Spectator
 
Quote:

you should use the cstrike module & use cs_set_user_team() on Spawn.
Tried. Does not work ...

Code:

public client_putinserver(id)
        cs_set_user_team(id, CS_TEAM_SPECTATOR)

Quote:

Not sure whether this can work directly.

To be safe, you could use a task!
You can read more?

fysiks 02-19-2013 22:23

Re: team Player is Spectator
 
Team Join Management by Exolent


All times are GMT -4. The time now is 21:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.