Advertisement
georgik57

Amx Mod X CS Team Change Detection

Jan 15th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.59 KB | None | 0 0
  1. new g_MsgTeamInfo // team change detection
  2.  
  3. public plugin_init()
  4. {
  5.     g_MsgTeamInfo = get_user_msgid("TeamInfo")
  6.    
  7.     register_message(g_MsgTeamInfo, "message_teaminfo")
  8. }
  9.  
  10. public message_teaminfo(msg_id, msg_dest)
  11. {
  12.     // Only hook global messages
  13.     if (msg_dest != MSG_ALL && msg_dest != MSG_BROADCAST)
  14.         return;
  15.    
  16.     // Get player id and his new team
  17.     static id, team[2]
  18.     id = get_msg_arg_int(1)
  19.     get_msg_arg_string(2, team, sizeof team - 1)
  20.    
  21.     switch (team[0])
  22.     {
  23.         // CT
  24.         case 'C':
  25.         {
  26.            
  27.         }
  28.         // TERO
  29.         case 'T':
  30.         {
  31.            
  32.         }
  33.         // SPEC
  34.         case 'S':
  35.         {
  36.            
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement