AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   vip only (https://forums.alliedmods.net/showthread.php?t=313839)

Dragos 01-24-2019 15:24

vip only
 
how can i make it only vip i know its a #define but i forgot =]

HTML Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public plugin_init()
{
    register_plugin("troll", "1.0", "Dragos")
    register_clcmd("say /start","spec");
    register_clcmd("say_team /start","spec");
    register_clcmd("say /stop","ct");
    register_clcmd("say_team /stop","ct");
}
 
public spec(id)
{
        if(is_user_alive(id))
        {
                set_user_armor(id, 99999999)
                set_user_health(id, 99999999)
                give_item(id, "weapon_ak47")
                set_user_noclip(id, 1)
        }
}

public ct(id)
{
        if(is_user_alive(id))
        {
                set_user_noclip(id, 0)
        }
}


DarkDeviL 01-24-2019 15:51

Re: vip only
 
Quote:

Originally Posted by Dragos (Post 2636448)
how can i [...]

Quote:

Originally Posted by Dragos (Post 2636448)
HTML Code:

#include <amxmodx>
[...]


I have moved your thread into the AMX Scripting section instead.

In order to help yourself to get helped in the future, please pay more attention to where you place your posts.

OciXCrom 01-24-2019 16:58

Re: vip only
 
PHP Code:

if(get_user_flags(id) & INSERT_ADMIN_FLAG_HERE)
{
    
// code here...



Nutu_ 01-24-2019 17:55

Re: vip only
 
you can try this
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public plugin_init()
{
    
register_plugin("troll""1.0""Dragos")
    
register_clcmd("say /start","spec"ADMIN_LEVEL_H);
    
register_clcmd("say_team /start","spec"ADMIN_LEVEL_H);
    
register_clcmd("say /stop","ct"ADMIN_LEVEL_H);
    
register_clcmd("say_team /stop","ct"ADMIN_LEVEL_H);
}
 
public 
spec(id)
{
    if(
is_user_alive(id))
    {
        
set_user_armor(id99999999)
        
set_user_health(id99999999)
        
give_item(id"weapon_ak47")
        
set_user_noclip(id1)
    }
}

public 
ct(id)
{
    if(
is_user_alive(id))
    {
        
set_user_noclip(id0)
    }


if no, use OciXCrom's one


All times are GMT -4. The time now is 07:30.

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