Raised This Month: $51 Target: $400
 12% 

Simple Godmode [Easy REQ]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 04-21-2012 , 12:56   Simple Godmode [Easy REQ]
Reply With Quote #1

Hi, my request is very simple.

How could i turn ON godmode for everyone, forever?

Like when they connect to the server, godmode to be already activated, and not to be possible to disable it.

I know it's a simple code with a few lines, but i cannot figure it out guys.

Thanks
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-21-2012 , 13:45   Re: Simple Godmode [Easy REQ]
Reply With Quote #2

Use ham spawn , when they spawn , give them god mode

Last edited by EpicMonkey; 04-21-2012 at 13:46.
EpicMonkey is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-21-2012 , 14:01   Re: Simple Godmode [Easy REQ]
Reply With Quote #3

Quote:
Originally Posted by bLacK-bLooD View Post
Hi, my request is very simple.

How could i turn ON godmode for everyone, forever?

Like when they connect to the server, godmode to be already activated, and not to be possible to disable it.

I know it's a simple code with a few lines, but i cannot figure it out guys.

Thanks
This should do the trick,
Attached Files
File Type: sma Get Plugin or Get Source (permanantgodmode.sma - 405 views - 592 Bytes)
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-21-2012 , 16:07   Re: Simple Godmode [Easy REQ]
Reply With Quote #4

Quote:
Originally Posted by GXLZPGX View Post
This should do the trick,
why not ham_spawn? , is ham_takedamage better?

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>

#define PLUGIN    "Permanant Godmode"
#define AUTHOR    "GXLZPGX"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHamHam_Spawn"player""Fw_PlayerSpawn")
}

public 
Fw_PlayerSpawn(id)
{
    if(!
is_user_alive(id))
    {
        return 
PLUGIN_HANDLED;
    }

    if(
get_user_godmode(id) == 0)
    {
        
set_user_godmode(id1)
    }
    return 
PLUGIN_HANDLED;

EpicMonkey is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-21-2012 , 18:08   Re: Simple Godmode [Easy REQ]
Reply With Quote #5

Yes, because if for any reason during the round, he has his godmode taken away, he'll live the rest of the round without it.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 04-22-2012 , 02:26   Re: Simple Godmode [Easy REQ]
Reply With Quote #6

Thanks GXLZPGX, it's working brilliantly
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-22-2012 , 12:56   Re: Simple Godmode [Easy REQ]
Reply With Quote #7

Quote:
Originally Posted by bLacK-bLooD View Post
Thanks GXLZPGX, it's working brilliantly
You're welcome
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-22-2012 , 13:17   Re: Simple Godmode [Easy REQ]
Reply With Quote #8

Bad method you use, GXLZPGX.

That should be like that :

Code:
#include < amxmodx > #include < hamsandwich > public plugin_init( ) {     RegisterHam( Ham_TakeDamage, "player", "hamTakeDamage" ); } public hamTakeDamage( ) {     return HAM_SUPERCEDE; }
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 04-22-2012 at 13:19.
Devil259 is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-22-2012 , 13:21   Re: Simple Godmode [Easy REQ]
Reply With Quote #9

Quote:
Originally Posted by Devil259 View Post
Bad method you use, GXLZPGX.

That should be like that :

Code:
#include < amxmodx > #include < hamsandwich > public plugin_init( ) {     RegisterHam( Ham_TakeDamage, "player", "hamTakeDamage" ); } public hamTakeDamage( ) {     return HAM_SUPERCEDE; }
Nah, my method is fine. He asked for godmode, not your own method of not taking damage.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 04-22-2012 , 14:39   Re: Simple Godmode [Easy REQ]
Reply With Quote #10

Quote:
Originally Posted by GXLZPGX View Post
Nah, my method is fine. He asked for godmode, not your own method of not taking damage.
Not able to take damage = Godmode
__________________
Ex1ne 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 15:30.


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