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
__________________