Raised This Month: $ Target: $400
 0% 

[REQ][cs]don't kill transfered players


  
 
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-12-2007 , 15:22   [REQ][cs]don't kill transfered players
#1

Hello,
in amx2006.3 plmenu, mod cstrike or czero, players aren't killed when transfered.
Is it possible to do the same with amxx ?

amx2006.3 plmenu.sma
Code:
public actionTeamMenu(id,key) {
  switch(key) {
    case 7: {
      ++g_menuOption[id]
      if(g_menuOption[id] == 3 && g_cstrikeRunning && get_cvar_num("allow_spectators") == 0) g_menuOption[id] = 1
      if(g_menuOption[id] == 4) g_menuOption[id] = 1
      displayTeamMenu(id, g_menuPosition[id])
    }
    case 8: displayTeamMenu(id, ++g_menuPosition[id])
    case 9: displayTeamMenu(id, --g_menuPosition[id])
    default: {
      new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
      new authid[32], authid2[32], name[32], name2[32], ipaddress[24], ipaddress2[24]
      get_user_name(id, name, 31)
      get_user_name(player, name2, 31)
      get_user_authid(id, authid, 31)
      get_user_authid(player, authid2, 31)
      get_user_ip(id, ipaddress, 23, 1)
      get_user_ip(player, ipaddress, 23, 1)

      switch(g_menuOption[id]) {
        case 1: {
          if(g_cstrikeRunning) {
            log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
              name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"TERRORISTS")
            switch(get_cvar_num("amx_show_activity")) {
              case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("TERRORISTS"))
              case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("TERRORISTS"))
              case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("TERRORISTS"))
            }
          }
          else if(g_dodRunning) {
            log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
              name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"ALLIES")
            switch(get_cvar_num("amx_show_activity")) {
              case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("ALLIES"))
              case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("ALLIES"))
              case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("ALLIES"))
            }
          }
          else {
            log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
              name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"TEAM 1")
            switch(get_cvar_num("amx_show_activity")) {
              case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("TEAM 1"))
              case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("TEAM 1"))
              case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("TEAM 1"))
            }
          }
        }
        case 2: {
          if(g_cstrikeRunning) {
            log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
              name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"CTs")
            switch(get_cvar_num("amx_show_activity")) {
              case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("CTs"))
              case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("CTs"))
              case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("CTs"))
            }
          }
          else if(g_dodRunning) {
            log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
              name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"AXIS")
            switch(get_cvar_num("amx_show_activity")) {
              case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("AXIS"))
              case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("AXIS"))
              case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("AXIS"))
            }
          }
          else {
            log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
              name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"TEAM 2")
            switch(get_cvar_num("amx_show_activity")) {
              case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("TEAM 2"))
              case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("TEAM 2"))
              case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("TEAM 2"))
            }
          }
        }
        case 3: {
          log_to_file(g_logFile,"Cmd: ^"%s<%d><%s><%s>^" transfer ^"%s<%d><%s><%s>^" (to ^"%s^")",
            name,get_user_userid(id),authid,ipaddress,name2,get_user_userid(player),authid2,ipaddress2,"SPECTATORS")
          switch(get_cvar_num("amx_show_activity")) {
            case 3: print_to_admins("acdefghijklmnopqrstuvw", print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("SPECTATORS"))
            case 2: client_print(0, print_chat, _T("ADMIN %s: transfer %s to %s"), name, name2, _T("SPECTATORS"))
            case 1: client_print(0, print_chat, _T("ADMIN: transfer %s to %s"), name2, _T("SPECTATORS"))
          }
        }
      }

      if(!(g_cstrikeRunning && g_funRunning)) {
        if(!(g_cstrikeRunning && g_vexdRunning)) {
          new limitt
          if(g_cstrikeRunning) {
            limitt = get_cvar_num("mp_limitteams")
            set_cvar_num("mp_limitteams", 0)
          }
          user_kill(player, 1)
          new szTeam[2]
          if(g_cstrikeRunning && g_menuOption[id] == 3) {
            num_to_str(6, szTeam, 1)
          }
          else {
            num_to_str(g_menuOption[id], szTeam, 1)
          }
          engclient_cmd(player, "jointeam", szTeam)
          if(g_menuOption[id] != 3) {
            if(g_cstrikeRunning) {
              engclient_cmd(player, "joinclass", "6")
            }
          }
          //show_menu(player, 0, "NULL", 0, "NULL")
          if(g_cstrikeRunning) {
            client_cmd(player, "slot5")
            set_cvar_num("mp_limitteams", limitt)
          }
        }
        else {
          setUserTeam_cs(player, g_menuOption[id], "", (is_user_alive(player) && g_menuOption[id] != 3) ? 1 : 0, 1)
          if(g_menuOption[id] == 3) user_kill(player, 1)
        }
      }
      else {
        set_user_team_cs(player, g_menuOption[id], "", (is_user_alive(player) && g_menuOption[id] != 3) ? 1 : 0, 1)
        if(g_menuOption[id] == 3) user_kill(player, 1)
      }

      if(player != id)
        displayTeamMenu(id, g_menuPosition[id])
    }
  }
  return PLUGIN_HANDLED
}
Attached Files
File Type: sma Get Plugin or Get Source (plmenu.sma - 214 views - 40.0 KB)
ConnorMcLeod is offline
BAILOPAN
Join Date: Jan 2004
Old 02-12-2007 , 16:04   Re: [REQ][cs]don't kill transfered players
#2

You can feel free to remove the "user_kill" line for your own server, however killing users will stay enabled by default.
__________________
egg
BAILOPAN 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 19:01.


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