Raised This Month: $ Target: $400
 0% 

join team event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
atambo
Senior Member
Join Date: Oct 2004
Location: Pittsburgh, PA
Old 09-07-2005 , 00:13   join team event
Reply With Quote #1

is there an event for joining a team? like if someone joins t or ct?
__________________
atambo is offline
Send a message via AIM to atambo Send a message via MSN to atambo Send a message via Yahoo to atambo
atambo
Senior Member
Join Date: Oct 2004
Location: Pittsburgh, PA
Old 09-07-2005 , 00:42  
Reply With Quote #2

"TextMsg"

ok I found that event and I can check if a player joins t or ct...but is there anyway to check to see if they have chosen a model for t or ct before I spawn them? because if I just register the event with them picking t or ct then if they arn't fast enough they will respawn without picking a model and be in counter-strike limbo
__________________
atambo is offline
Send a message via AIM to atambo Send a message via MSN to atambo Send a message via Yahoo to atambo
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-07-2005 , 01:21  
Reply With Quote #3

What is this for? Ive edited a plugin for someone that fixed the respawn bug that they dont get respawned. and it doesnt do it till they have chosen a team. but its not a specific event.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
atambo
Senior Member
Join Date: Oct 2004
Location: Pittsburgh, PA
Old 09-07-2005 , 01:28  
Reply With Quote #4

well I'm looking for a regular respawn plugin that will not only respawn people when they die but also respawn them when they join the server after they pick a team...so far I dont see any that actually work without somekind of timer...like what if someone went spectator but then joined a team later on...I would like something that will be nice and reliable so that I can always know that with respawn on everyone is alive if they want to be
__________________
atambo is offline
Send a message via AIM to atambo Send a message via MSN to atambo Send a message via Yahoo to atambo
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-07-2005 , 01:45  
Reply With Quote #5

From the Team Locker plugin by bardelot (ported by karamellz):

Code:
#define KEY_T       0 #define KEY_CT      1 #define KEY_AUTO    4 #define KEY_SPEC    5 public plugin_init() {    register_menucmd(register_menuid("Team_Select"),(1<<0)|(1<<1)|(1<<4)|(1<<5),"team_select") } public team_select(id,key) {    if(key == KEY_T || key == KEY_CT || key == KEY_AUTO) {       // they joined a team presumably    } }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-07-2005 , 03:41  
Reply With Quote #6

What about for class select? ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
atambo
Senior Member
Join Date: Oct 2004
Location: Pittsburgh, PA
Old 09-07-2005 , 07:25  
Reply With Quote #7

thats going to be the same as the "TextMsg" event telling me when they join a team but not when they pick a skin or class or whatever and are ready to spawn

does anyone know what cs_get_user_model returns if they haven't picked one yet?
__________________
atambo is offline
Send a message via AIM to atambo Send a message via MSN to atambo Send a message via Yahoo to atambo
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-07-2005 , 07:46  
Reply With Quote #8

Code:
register_event("TextMsg","join_respawn","a","1=1","2&Game_join_te","2&Game_join_ct")

And I've already done what you're looking to do.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
atambo
Senior Member
Join Date: Oct 2004
Location: Pittsburgh, PA
Old 09-07-2005 , 07:48  
Reply With Quote #9

ahh then what do you do in the join_respawn function? just have a timer and spawn them?
__________________
atambo is offline
Send a message via AIM to atambo Send a message via MSN to atambo Send a message via Yahoo to atambo
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-07-2005 , 07:51  
Reply With Quote #10

Here's the exact way I used it:

Code:
public join_respawn() {     if(surfmap == false)     {         return PLUGIN_CONTINUE     }     if(get_cvar_num("surf_on")==0)     {         return PLUGIN_CONTINUE     }     if(get_cvar_num("surf_respawn")==0)     {         return PLUGIN_CONTINUE     }         new arg[32]     read_data(3,arg,31)         new id = cmd_target(1,arg,0)         // Spawn the player twice to avoid the HL engine bug     set_task(0.5,"player_spawn",id)     set_task(0.7,"player_spawn",id)         // Then give them a suit and a knife     set_task(0.9,"player_giveitems",id)         return PLUGIN_CONTINUE }
Code:
public player_spawn(id) {     spawn(id) }
Code:
public player_giveitems(id) {     give_item(id, "item_suit")     give_item(id, "weapon_knife")         return PLUGIN_CONTINUE }

It's actually taken partly from Geesu's Respawn Forever, but the joining on connect was added by me.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 14:24.


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