Counter-Strike 1.6 Icon CS1.6 Script

[AMXX] Admin Poison

SEX! Ok, we got your attention. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Rj. points.
  • Post: Give Rj. your thoughts on this Script.
  • Vote: Help Rj. win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Sound fun?

Become a Bananite

Already a Bananite? Login

144 lines | 4 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* Admin Posion.
*
* (c) Copyright 2002-2003, AssKicR
* This file is provided as is (no warranties).
*/
 

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine_const>

/*
* Usage: amx_poison <nick> <damage/second> <secs>
* Examples:
* amx_poison AssKicR 10 10       - makes AssKicR loose 10hp every sec for 10secs
* amx_poison HaXXor 1 100   - makes HaXXor loose 1 hp every sec for 100secs
*
*
* Know Bugs::
* None
*
*/


new g_isPoisoned[33]
new g_PoisonDmg[33]
new g_PoisonTime[33]
new gmsgDamage
//----------------------------------------------------------------------------------------------
public plugin_init()
{
  // Plugin Info
  register_plugin("Admin Poison","1.1","AssKicR")
  register_concmd("amx_poison","cmdPoison",ADMIN_SLAY,"<nick> <damage/second> <secs>")
  set_task(1.0,"posion_loop",0,"",0,"b" )
  register_event("DeathMsg","death","a")
  register_event("ResetHUD","newround","b")
}
//----------------------------------------------------------------------------------------------
public posion_loop()
{
        for ( new id=1; id<=32; id++ ) {
                if (  g_isPoisoned[id] && is_user_alive(id)  )  
                {
                        if ( is_user_alive(id) )
                        {
                                new userHealth=get_user_health(id)
                                set_user_health(id, userHealth - g_PoisonDmg[id] )
                                g_PoisonTime[id]=(g_PoisonTime[id]-1)
                                if (g_PoisonTime[id]<=0)
                                {
                                        g_isPoisoned[id]=false
                                }
                                if ( userHealth - g_PoisonDmg[id] <= 0 )
                                {
                                        message_begin( MSG_BROADCAST, get_user_msgid("DeathMsg"),{0,0,0},0)
                                        write_byte(id)
                                        write_byte(id)
                                        write_byte(0)
                                        write_string("infection")
                                        message_end()
                                }
                        }

                        new korigin[3]
                        get_user_origin(id,korigin)
                        message_begin(MSG_ONE, gmsgDamage, {0,0,0}, id)  
                        write_byte(30) // dmg_save  
                        write_byte(30) // dmg_take  
                        write_long((DMG_ENERGYBEAM)) // visibleDamageBits  
                        write_coord(korigin[0]) // damageOrigin.x  
                        write_coord(korigin[1]) // damageOrigin.y  
                        write_coord(korigin[2]) // damageOrigin.z  
                        message_end()
                }
        }
}
//----------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
public client_connect(id) {
g_isPoisoned[id]=false
}
//----------------------------------------------------------------------------------------------
public client_disconnect(id) {
g_isPoisoned[id]=false
}
//----------------------------------------------------------------------------------------------
public death() {
new id = read_data(2)
g_isPoisoned[id]=false
}
//----------------------------------------------------------------------------------------------
public newround(id) {
g_isPoisoned[id]=false
}
//----------------------------------------------------------------------------------------------

public cmdPoison(id,level,cid){
  if (!cmd_access(id,level,cid,2))
    return PLUGIN_HANDLED
 
  new arg[32]
  read_argv(1,arg,31)

  new player = cmd_target(id,arg,5)
  if (!player) return PLUGIN_HANDLED
  new spower[32],authid[16],name2[32],authid2[16],name[32],newarg[32]

  read_argv(2,spower,31)
  new damage = str_to_num(spower)
 
  read_argv(3,newarg,31)
  new ptime = str_to_num(newarg)

  if (damage == 0 && ptime == 0) {
  g_isPoisoned[player]=true
  g_PoisonDmg[player]=1
  g_PoisonTime[player]=99
  }
  if (damage <= 0) {
          client_print(id,print_console,"You cannot poison with 0 dmg or less")
          return PLUGIN_HANDLED
  }

  if (ptime <= 0) {
          client_print(id,print_console,"You cannot poison for 0 seconds")
          return PLUGIN_HANDLED
  }
  g_isPoisoned[player]=true
  g_PoisonDmg[player]=damage
  g_PoisonTime[player]=ptime
  get_user_authid(id,authid,15)
  get_user_name(id,name,31)
  get_user_authid(player,authid2,15)
  get_user_name(player,name2,31)
  log_amx("Cmd: ^"%s<%d><%s><>^" posion with %d damage each second for %d seconds ^"%s<%d><%s><>^"",
    name,get_user_userid(id),authid, damage, ptime,name2,get_user_userid(player),authid2 )
   
  switch(get_cvar_num("amx_show_activity")) {
    case 2: client_print(0,print_chat,"ADMIN %s: poison %s with %d damage each second",name,name2,damage)
    case 1: client_print(0,print_chat,"ADMIN: poison %s with %d damage each second",name2,damage)
  }      
     
  return PLUGIN_HANDLED
}
Admin Posion 

Poison Players on your server so they loose X hp every second for Y seconds 

Usage: amx_poison <nick> <damage/second> <secs>

Examples: 
amx_poison AssKicR 10 10 - makes AssKicR loose 10hp every sec for 10secs
amx_poison HaXXor 1 100 - makes HaXXor loose 1 hp every sec for 100secs

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Authors
AssKicR
AMXX Script/Codes

Submitter

Rj. avatar
Rj. Dreamin'
Member Joined 1y
36 medals 4 legendary 9 rare
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • Thanked 500 submitters Medal icon
  • 2nd Place - Game Poetry Contest Medal icon
  • Submitted 5 Tools Medal icon

Rj.
Redistributor
Are you the owner? Request Ownership
Send a Private Message to the submitter

Category

Stats

Posts
0
Views
425
Date Added
3mo
bcp.crwdcntrl.net tracking pixel