Thread: Vip plugin
View Single Post
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 03-05-2021 , 14:07   Re: Vip plugin
Reply With Quote #3

Quote:
Originally Posted by rgn6 View Post
HI

Can anyone advise how to adjust it to give vip toys spawn items in the second round of the map?

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

#define PLUGIN_VERSION "1.0"
#define VIP_FLAG ADMIN_LEVEL_E

public plugin_init()
{
    
register_plugin("Generated VIP Plugin"PLUGIN_VERSION"AMXX-BG.info")
    
register_cvar("amxxbg_vip"PLUGIN_VERSIONFCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
    
register_event("HLTV""event_new_round""a""1=0""2=0");
         
RegisterHam(Ham_Spawn"player""OnPlayerSpawn"1)
}

public 
OnPlayerSpawn(id)
{
    if(
gRound>=2){
        if(
gRound<=40){

        
give_item(id"weapon_ak47")
    
cs_set_user_bpammo(idCSW_AK47120)
    
give_item(id"weapon_m4a1")
    
cs_set_user_bpammo(idCSW_M4A1120)
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idCSW_FLASHBANG3)
    
give_item(id"weapon_smokegrenade")
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE2)
}

bool:is_user_vip(id)
    return !!(
get_user_flags(id) & VIP_FLAG
https://forums.alliedmods.net/showthread.php?t=156574
Theodore Bagwell is offline