Raised This Month: $32 Target: $400
 8% 

[Solved] Prevent damage w/o Godmode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-27-2020 , 10:01   [Solved] Prevent damage w/o Godmode
Reply With Quote #1

Hey AM,

I wanted to know if there's a way to prevent damage from other team, without having godmode set. Thanks for the assistance!

Best regards.
MaNaReaver is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 10:17   Re: Prevent damage w/o Godmode
Reply With Quote #2

Why not use godmode, give us a little bit more detail. Why is amx_godmode bad?
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-27-2020 , 10:21   Re: Prevent damage w/o Godmode
Reply With Quote #3

Quote:
Originally Posted by supertrio17 View Post
Why not use godmode, give us a little bit more detail. Why is amx_godmode bad?
I have a zombie bot that does damage to both teams, but I don't want players to kill each other instead of the zombie. It's a point based game, that awards points on killing zombies. So setting everyone to the same team doesn't do good.

I was thinking of using the hitpoint plugin to reduce the damage to 0, but that would also prevent damage to zombie.
MaNaReaver is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 10:25   Re: Prevent damage w/o Godmode
Reply With Quote #4

Do you mind sharing zombie bot plugin with us, its way easier to edit that plugin than make a new one.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-27-2020 , 10:29   Re: Prevent damage w/o Godmode
Reply With Quote #5

Quote:
Originally Posted by supertrio17 View Post
Do you mind sharing zombie bot plugin with us, its way easier to edit that plugin than make a new one.
Sorry, it's private and under the works, so I don't think I'll be able to share it right now.
MaNaReaver is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 10:31   Re: Prevent damage w/o Godmode
Reply With Quote #6

Well if it is private, than it means you made it? So I could make a code and you could implement it in your code . Seems fair
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 11:23   Re: Prevent damage w/o Godmode
Reply With Quote #7

Quote:
Originally Posted by MaNaReaver View Post
Hey AM,

I wanted to know if there's a way to prevent damage from other team, without having godmode set. Thanks for the assistance!

Best regards.
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!
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
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
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 12:00   Re: Prevent damage w/o Godmode
Reply With Quote #9

Okay, I'll try and figure out something else
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-27-2020 , 12:03   Re: Prevent damage w/o Godmode
Reply With Quote #10

Quote:
Originally Posted by supertrio17 View Post
Okay, I'll try and figure out something else
Thanks again!
MaNaReaver is offline
Reply



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 18:20.


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