Raised This Month: $193 Target: $400
 48% 

Auto Join on Connect


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   Emp` (115)
VEN
Veteran Member
Join Date: Jan 2005
Old 02-11-2007 , 13:12   Auto Join on Connect
Reply With Quote #1

Auto Join on Connect
Description
Plugin allow to players automatically join team/team&class on connect.
CVars
  • ajc_team (0: OFF, N: team index, 5: auto team, default: 5) - controls team join
  • ajc_class (0: OFF, N: class index, 5: auto class, default: 5) - controls class join
  • ajc_imm (0: OFF, 1: ON, default: 1) - don't affect on immuned players (ON/OFF)

Credits
Major__ - inquiry
Attached Files
File Type: sma Get Plugin or Get Source (auto_join_on_connect.sma - 51475 views - 2.9 KB)
VEN is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 02-11-2007 , 13:14   Re: Auto Join on Connect
Reply With Quote #2

So while connecting you can pick or team & class? I'm confused.
__________________
i stop around here and there.
Da_sk8rboy is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 02-11-2007 , 13:37   Re: Auto Join on Connect
Reply With Quote #3

"team/team&class" mean "team OR (team AND class)"
VEN is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 02-11-2007 , 14:15   Re: Auto Join on Connect
Reply With Quote #4

Code:
public task_force_team_join(menu_msgid[], id) {
 
   // Need check user if connected? I think.
   // Or else crash server if client disconnect when using engclient_cmd
   if (!is_user_connected(id))
     return
 
}
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
VEN
Veteran Member
Join Date: Jan 2005
Old 02-12-2007 , 02:26   Re: Auto Join on Connect
Reply With Quote #5

Code:
// not really because if user isn't connected // native result will be equal to -1 // i.e. true, and hence, return if (get_user_team(id))         return
Code:
// amxmodx.cpp static cell AMX_NATIVE_CALL get_user_team(AMX *amx, cell *params) /* 3 param */ {         int index = params[1];                 if (index < 1 || index > gpGlobals->maxClients)                 return -1;                 CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);        
        if (pPlayer->ingame)
        {                 /* <snip> */                 if (params[3])                 {                         set_amxstring(amx, params[2], pPlayer->team.c_str(), params[3]);                 }
                return pPlayer->teamId;
        }        
        return -1;
}

Last edited by VEN; 02-12-2007 at 02:38.
VEN is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 02-12-2007 , 03:05   Re: Auto Join on Connect
Reply With Quote #6

O, my bad.
I got the info thanks.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
Zenith77
Veteran Member
Join Date: Aug 2005
Old 02-12-2007 , 19:00   Re: Auto Join on Connect
Reply With Quote #7

May the source be with you.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 02-13-2007 , 09:12   Re: Auto Join on Connect
Reply With Quote #8

Simple and useful... Another great Plugin by VEN! +karma good stuff!
SubStream is offline
MrCoolMan
Member
Join Date: Nov 2005
Old 02-14-2007 , 09:25   Re: Auto Join on Connect
Reply With Quote #9

I wanna say thnx for this plugin been waiting for one like this
__________________
MrCoolMan is offline
fawk3s
BANNED
Join Date: Oct 2006
Location: Earth
Old 06-14-2007 , 07:24   Re: Auto Join on Connect
Reply With Quote #10

Quote:
Originally Posted by MrCoolMan View Post
I wanna say thnx for this plugin been waiting for one like this
But if I let ppl only join CT, and every1 is in CT, will there be "Game coming!" and will the game start?
fawk3s is offline
Reply


Thread Tools
Display Modes

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 01:31.


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