AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Invicible in seconds with server bind (https://forums.alliedmods.net/showthread.php?t=314282)

HowToRuski 02-11-2019 15:36

Invicible in seconds with server bind
 
Hi, is there any script where you get invincible(god mode) by pressing button F aka flashlights button with admin flag h?

^SmileY 02-11-2019 19:27

Re: Invicible in seconds with server bind
 
Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>

public plugin_init()
{
        register_plugin("GOD Mode","0.1","SmileY");

        register_impulse(100,"FlashLight");
}

public FlashLight(id,impulse)
{
        if(access(id,ADMIN_LEVEL_H))
        {
                new Status = get_user_godmode(id);
               
                set_user_godmode(id,Status ? 0 : 1);
               
                client_print(id,print_chat,"[AMXX] God Mode %s. Press 'F' again to change...",Status ? "OFF" : "ON");
        }
       
        return PLUGIN_CONTINUE;
}

NOT Tested

HowToRuski 02-12-2019 09:49

Re: Invicible in seconds with server bind
 
but if i want it active for like 3 seconds and it will deactivate and will be available again after a minute or so?

HowToRuski 02-12-2019 14:20

Re: Invicible in seconds with server bind
 
Quote:

Originally Posted by ^SmileY (Post 2639250)
Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>

public plugin_init()
{
        register_plugin("GOD Mode","0.1","SmileY");

        register_impulse(100,"FlashLight");
}

public FlashLight(id,impulse)
{
        if(access(id,ADMIN_LEVEL_H))
        {
                new Status = get_user_godmode(id);
               
                set_user_godmode(id,Status ? 0 : 1);
               
                client_print(id,print_chat,"[AMXX] God Mode %s. Press 'F' again to change...",Status ? "OFF" : "ON");
        }
       
        return PLUGIN_CONTINUE;
}

NOT Tested

so can u pls help? :( i want it to be an available command in like every 60 seconds and the power lasts 3 seconds


All times are GMT -4. The time now is 04:28.

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