Raised This Month: $ Target: $400
 0% 

need help finnishing godmode plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Frogstomp
Member
Join Date: Jun 2008
Location: Straya (Australia)
Old 01-14-2009 , 23:50   need help finnishing godmode plugin
Reply With Quote #1

ok i have this
Code:
//GodMode Reward
//Alpha - NOT tested

//Included Modules
#include <amxmodx>
#include <fakemeta_util>
#include <amxmisc>
#include <fun>

//Definitions
#define PLUGIN "GodMode Reward"
#define VERSION "0.1"
#define AUTHOR "Andyz0r" //Based on hleV's Grenade Reward Plugin
#define MAX_PLAYERS 32

//New Variables
new g_iKills[MAX_PLAYERS + 1];
new g_pcvarKills;

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR); 
        
        g_pcvarKills = register_cvar("amx_gmr_kills", "10");
          
        register_cvar("amx_gmr_enable", "0");
        register_event("DeathMsg", "eventDeathMsg", "a");
        register_clcmd("fullupdate", "clcmd_fullupdate")
        set_task(900.0, "creditdonotdelete");  
}

public creditdonotdelete()
{
    if(get_cvar_num("amx_gmr_enable") == 1)
    {
    client_print(0, print_chat, "You Have Been Awarded GODMODE!")
    }
}
 
public eventDeathMsg()
{
        if (!get_pcvar_num(g_pcvarKills))
                return;
 
        new iKiller = read_data(1);
 
        if (iKiller == read_data(2))
                return;
        
        if(get_cvar_num("amx_gmr_enable") == 1)
        {
        
        new iKills = get_pcvar_num(g_pcvarKills);
        g_iKills[iKiller]++
 
        if (g_iKills[iKiller] == iKills)
        {
        //set_task(0.1, "protect", iKiller)
        set_user_godmode(iKiller, 1)
        }
        
        }
}

public clcmd_fullupdate(id)
{
   return PLUGIN_HANDLED
}

public client_putinserver(id)
{
    set_user_godmode(id, 0)
}
it compiles it just doesn't give godmode after the 10 kills or at all can someone help me finnish it
__________________
Play Hyper-strike!
(The best cs 1.6 mod)
Frogstomp is offline
 


Thread Tools
Display Modes

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 01:46.


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