Raised This Month: $ Target: $400
 0% 

Some help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Baws
Veteran Member
Join Date: Oct 2012
Old 01-10-2016 , 04:13   Re: Some help
Reply With Quote #3

Quote:
Originally Posted by raizo11 View Post
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>

public plugin_init() 
{
    register_plugin("Free Godmode", "0.1", "zmd94")

    register_cvar("god_kill", "1")
    
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 1)
}

public fw_PlayerKilled(iVictim, iKiller)  
{
    if (iVictim == iKiller || !is_user_alive(iKiller) || !get_cvar_num("god_kill") )
        return
    
    set_user_godmode(iKiller, 1)
    set_task(2.0, "Reset", iKiller)
}

public Reset(id)
{
    if(is_user_alive(id))
    {
        set_user_godmode(id, 0)
    }
}
pcvars are way better.
__________________
Like my clean plugins and work?
Baws 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 09:28.


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