View Single Post
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-27-2020 , 11:59   Re: Prevent damage w/o Godmode
Reply With Quote #8

Quote:
Originally Posted by supertrio17 View Post
I was overthinking it, it's quite simple. But be aware that god_mode will disappear only when map changes, thas why I said use it in the plugin itself. If you need help when implementing this in your plugin, you are free to tell me
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>

#define VERSION "1.3"

public plugin_init() 
{
    
register_plugin("Something like a GodMode"VERSION"Mr. Boopsy");
    
RegisterHam(Ham_Spawn"player""OnPlayerSpawn"1);
}

public 
OnPlayerSpawn(id)
{
    if(
is_user_alive(id))
    {
        
set_user_godmode(id1);
    }

Tested on bots!
A friend of mine and I've been working on it, that's why I'm unable to publically share the plugin as of now. Also, this is basically a godmode implementation, and I can't use this as the zombie bot does damage when it comes in contact to the player. Thanks though, appreciate your time on helping me out with this.
MaNaReaver is offline