Raised This Month: $51 Target: $400
 12% 

[Request] Kill admin or vip get slayed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hiral
Junior Member
Join Date: Feb 2021
Old 02-02-2021 , 22:30   [Request] Kill admin or vip get slayed
Reply With Quote #1

Can someone please help me to find a plugin which slays the player who kills an admin or vip (I needed it for my new mod)
Hiral is offline
Firippu
Senior Member
Join Date: Jan 2007
Old 02-03-2021 , 05:39   Re: [Request] Kill admin or vip get slayed
Reply With Quote #2

pretty straight forward. hooks death event, checks if the victim has admin flags or is vip. if true, it kills the killer.

completely untested.

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <amxmisc>

public plugin_init() {
    
register_plugin("nothing","0.0","nobody")
    
register_event("DeathMsg","fwdPlayerKilled","a")
}

public 
fwdPlayerKilled() {
    new 
iKiller=read_data(1)
    new 
iVictim=read_data(2)

    if(
is_user_admin(iVictim) || cs_get_user_vip(iVictim)) {
        if(
is_user_alive(iKiller))
            
user_kill(iKiller)
    }

__________________
Firippu is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-03-2021 , 11:00   Re: [Request] Kill admin or vip get slayed
Reply With Quote #3

this is a bit cruel for the normal players dont you think?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-03-2021 , 13:57   Re: [Request] Kill admin or vip get slayed
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
this is a bit cruel for the normal players dont you think?
No normal player is good enough to kill an almighty admin. If he does, he deserves to be punished as he must be a cheater.
__________________

Last edited by OciXCrom; 02-03-2021 at 13:57.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Hiral
Junior Member
Join Date: Feb 2021
Old 02-04-2021 , 23:44   Re: [Request] Kill admin or vip get slayed
Reply With Quote #5

Quote:
Originally Posted by Firippu View Post
pretty straight forward. hooks death event, checks if the victim has admin flags or is vip. if true, it kills the killer.

completely untested.

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <amxmisc>

public plugin_init() {
    
register_plugin("nothing","0.0","nobody")
    
register_event("DeathMsg","fwdPlayerKilled","a")
}

public 
fwdPlayerKilled() {
    new 
iKiller=read_data(1)
    new 
iVictim=read_data(2)

    if(
is_user_admin(iVictim) || cs_get_user_vip(iVictim)) {
        if(
is_user_alive(iKiller))
            
user_kill(iKiller)
    }

Thank you! its working perfect.
Hiral is offline
Reply



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


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