AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Vip Equipments (https://forums.alliedmods.net/showthread.php?t=332096)

joaokb 04-22-2021 20:42

Vip Equipments
 
hello, im trying to make people with "h" adm flag in my server have smoke, 2 flash's and he and vesthelm every round

i tryied this code but everyone in the server has the smoke, i want just for the vips with "h" flag

can anyone help me?

PHP Code:

#include <amxmodx>
#include <fun>
#include <colorchat>
#include < hamsandwich >
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>


#define VIP-ACC ADMIN_LEVEL_H

new VIPhealth

public 
plugin_init() 
{

    
register_plugin"VIP Privilage""1.0""(K![L]leR-ND)" )
    
RegisterHam(Ham_Spawn"player""Privilage"1)    

    
VIPhealth register_cvar("health_VIP""100"


}

public 
Privilage(id)
{
        if( 
get_user_flagsid ) & VIP-ACC 
        {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 100HP ^3-^1 Full nade Pack")
        }

        
set_user_health(idget_pcvar_num(VIPhealth))
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
        

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/ 


Culverton smith 04-23-2021 03:15

Re: Vip Equipments
 
PHP Code:

#include <amxmodx>
#include <fun>
#include <colorchat>
#include <hamsandwich>
//#include <cstrike>
//#include <engine>
//#include <fakemeta>
//#include <fakemeta_util>


#define VIP-ACC ADMIN_LEVEL_H

new VIPhealth

public 
plugin_init() 
{

    
register_plugin"VIP Privilage""1.0""(K![L]leR-ND)" )
    
RegisterHam(Ham_Spawn"player""Privilage"1)    

    
VIPhealth register_cvar("health_VIP""100"


}

public 
Privilage(id)
{
        if(
get_user_flags(id) & VIP-ACC
        {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 100HP ^3-^1 Full nade Pack")

        
set_user_health(idget_pcvar_num(VIPhealth))
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
    }
        



joaokb 04-23-2021 08:29

Re: Vip Equipments
 
Quote:

Originally Posted by Culverton smith (Post 2744868)
PHP Code:

#include <amxmodx>
#include <fun>
#include <colorchat>
#include <hamsandwich>
//#include <cstrike>
//#include <engine>
//#include <fakemeta>
//#include <fakemeta_util>


#define VIP-ACC ADMIN_LEVEL_H

new VIPhealth

public 
plugin_init() 
{

    
register_plugin"VIP Privilage""1.0""(K![L]leR-ND)" )
    
RegisterHam(Ham_Spawn"player""Privilage"1)    

    
VIPhealth register_cvar("health_VIP""100"


}

public 
Privilage(id)
{
        if(
get_user_flags(id) & VIP-ACC
        {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 100HP ^3-^1 Full nade Pack")

        
set_user_health(idget_pcvar_num(VIPhealth))
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
    }
        



thanks, i think it works :):wink:

iceeedr 04-23-2021 11:21

Re: Vip Equipments
 
You don't need all those included, and you forgot to check if the player was alive in the spawn and forgot the vesthelm.

PHP Code:

#include <amxmodx>
#include <fun>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>

#define VIP-ACC         ADMIN_LEVEL_H

new VIPhealth

public plugin_init()
{

    
register_plugin"VIP Privilage""1.0""(K![L]leR-ND)" )
    
RegisterHam(Ham_Spawn"player""Privilage"1)

    
VIPhealth register_cvar("health_VIP""100")
}

public 
Privilage(id)
{
        if(
is_user_alive(id) && get_user_flagsid ) & VIP-ACC )
        {
                
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 100HP ^3-^1 Full nade Pack")

                
set_user_health(idget_pcvar_num(VIPhealth))
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
                
cs_set_user_armor id100CS_ARMOR_VESTHELM )
        }



joaokb 04-24-2021 09:10

Re: Vip Equipments
 
Quote:

Originally Posted by iceeedr (Post 2744905)
You don't need all those included, and you forgot to check if the player was alive in the spawn and forgot the vesthelm.

PHP Code:

#include <amxmodx>
#include <fun>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>

#define VIP-ACC         ADMIN_LEVEL_H

new VIPhealth

public plugin_init()
{

    
register_plugin"VIP Privilage""1.0""(K![L]leR-ND)" )
    
RegisterHam(Ham_Spawn"player""Privilage"1)

    
VIPhealth register_cvar("health_VIP""100")
}

public 
Privilage(id)
{
        if(
is_user_alive(id) && get_user_flagsid ) & VIP-ACC )
        {
                
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 100HP ^3-^1 Full nade Pack")

                
set_user_health(idget_pcvar_num(VIPhealth))
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
                
cs_set_user_armor id100CS_ARMOR_VESTHELM )
        }



are you iceeedr that made the famous pug/mix plugin bro?


All times are GMT -4. The time now is 19:51.

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