Quote:
Originally Posted by Dr.G
http://www.amxmodx.org/funcwiki.php?go=func&id=114
--->
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /godmode","god_mode")
register_clcmd("say_team /godmode","god_mode")
}
public god_mode(id)
{
if(!get_user_godmode(id))
{
set_user_godmode(id,1)
client_print(id,print_chat,"Godmode is ON")
}
else
{
set_user_godmode(id,0)
client_print(id,print_chat,"Godmode is OFF")
}
return PLUGIN_HANDLED
}
|
Is godmode to surf, if I fall from 500mts I don't get damage.
Thanks to all, I fix the problem.
PHP Code:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if (victim == attacker || !is_user_connected(attacker))
return HAM_IGNORED;
if (get_pcvar_num(cvar_godmode))
{
if (g_godmode[attacker])
{
set_user_hitzones(0, attacker, 255)
g_godmode[attacker] = false
}
}
else
return HAM_IGNORED;
return HAM_IGNORED;
}
And now work fine.