Thread: [INC] NS Team
View Single Post
Author Message
Mevrael
Junior Member
Join Date: Jul 2008
Location: Riga, Latvia
Old 06-14-2010 , 09:49   [INC] NS Team
Reply With Quote #1

Mod: Natural-Selection 3.2

Description:

Those functions provides a simple manipulation with NS (MvA) teams:
1) Check if player is in team
2) Change player team
3) Count players in team
4) Get players ID and count in team

Usage:
1) Download nsteam.inc and place to your addons/amxmodx/scripting/include folder.
2) Include it in your plugins (#include <nsteam>) and go on.

Stocks:
nst_is_readyroom(index) - return true if player is in readyroom.
nst_is_spectate(index) - return true if player is in spectatorteam.
nst_is_marine(index) - return true if player is in marine team.
nst_is_alien(index) - return true if player is in alien team.

nst_readyroom(index) - send a player to readyroom if he isn't already in readyroom.
nst_readyroomall() - send all players to readyroom.
nst_spectate(index) - send a player to spectatorteam.
nst_marine(index) - send a player to marine team.
nst_alien(index) - send a player to alien team.

nst_readyroom_count() - return a number of players in readyroom.
nst_spectate_count() - return a number of players in spectatorteam.
nst_marine_count() - return a number of players in marine team.
nst_alien_count() - return a number of players in alien team.

Those functions return an array with 33 elements. 1-32 are player indexes and 0 - player count in this team:

nst_get_readyroom() - get readyroom players.
nst_get_spectate() - get spectators.
nst_get_marine() - get marines.
nst_get_alien() - get aliens.

Example: client_print to all marines
PHP Code:
new marines[33], i
marines 
nst_get_marine()
for (
i=1i<=marines[0]; i++)
{
     
client_print(marines[i], print_chat"You are marine!")

Attached Files
File Type: inc nsteam.inc (5.1 KB, 303 views)

Last edited by Mevrael; 06-16-2010 at 03:39.
Mevrael is offline
Send a message via ICQ to Mevrael