Raised This Month: $51 Target: $400
 12% 

real players should not be at terrorist team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shino
Senior Member
Join Date: May 2006
Old 05-27-2006 , 07:57   real players should not be at terrorist team
Reply With Quote #1

i want all bots to be at terrorist team and all real players at ct team. so far, i've got this:
Code:
public TeamCheck(players[]) {        new players[32],num,i     get_players(players,num)     for(i = 0; i <= num; i++) {         new id = players[i]         if (is_user_bot(id) && cs_get_user_team(id) == CS_TEAM_CT) {             cs_set_user_team(id,CS_TEAM_T)             set_cvar_num("sv_restartround", 1)

problem occurs, when real player joins terrorist team. i was thinking of something like this:
Code:
else {             cs_set_user_team(id,CS_TEAM_CT)         }     }     return PLUGIN_CONTINUE }
or
Code:
public TeamCheck(players[]) {        new players[32],num,i     get_players(players,num)     for(i = 0; i <= num; i++) {         new id = players[i]         new t_players, bot_num, t_rplayers         t_players = get_playersnum(CS_TEAM_T)         bot_num = get_cvar_num("bot_quota")         t_rplayers = t_players - bot_num         // then it would find the real player and throw him to cts     } }

any suggestions? thanks
shino is offline
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-27-2006 , 07:59  
Reply With Quote #2

first one looks better. Not as "messy"
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 08:22  
Reply With Quote #3

You can run get_players and use the flag "e", with parameter "TERRORIST" or "CT", which will isolate one team for you.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-27-2006 , 08:26  
Reply With Quote #4

my bad didnt read the whole post:
NEW POST:
Not a clue :/
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:58.


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