Raised This Month: $ Target: $400
 0% 

Problems with a selection detection


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 10-04-2005 , 13:02  
Reply With Quote #10

Dusting off some old code and seeing if I can get this working again

But I need a server willing to test

Code:
 #include <amxmodx> public client_putinserver(id) {     set_task(1.0,"assign_teams")     return PLUGIN_CONTINUE } public assign_teams(id){     new plist[32],pnum,team[32]     new i     get_players(plist,pnum)         for(i=0; i<pnum; i++)     {         get_user_team(plist[i],team,31)         if(team[0]=='U')         {             if(get_user_flags(plist[i])&ADMIN_IMMUNITY)             {                 return PLUGIN_CONTINUE             }             server_print("Team: %s",team)             client_cmd(get_user_userid(plist[i]),"menuselect 5")             return PLUGIN_CONTINUE         }     }     return PLUGIN_CONTINUE } public block_teams(id){     new team[32]     get_user_team(id,team,31)     if(get_user_flags(id)&ADMIN_IMMUNITY)     {         return PLUGIN_CONTINUE     }     if(team[0]!='U')     {         client_cmd(id,"menuselect 10")         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE } public check_time(id) {     new plist[32],pnum     get_players(plist,pnum,"b")     new i     for(i=0; i<pnum; i++)     {         if(is_user_alive(get_user_userid(plist[i]))!=1)         {             if(get_user_flags(plist[i])&ADMIN_IMMUNITY)             {                 return PLUGIN_CONTINUE             }else{                 server_cmd("kick #%d ^"You failed to select a skin in time^"",plist[i])             }         }         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE } public plugin_init(){     register_plugin("Automatic Team Assign","0.2.2","FlyingMongoose")     register_event("ShowMenu","block_teams","b","4&Team_Select")     register_event("VGUIMenu","block_teams","b","1=2","1=26","1=27")     register_logevent("check_time",2,"0=World triggered","1=Round_Start")     return PLUGIN_CONTINUE }

I've made a TINY change (I fixed format of one of my loops) lol. Anyone have any more suggestions?

I'm also thinking of basing this around the round time instead of round start, how can I recieve that variable to give that player that much time to select a skin?

Yay for necro-posting
FlyingMongoose is offline
 



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:40.


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