HI
Please advice or edit so that VIP players can load spawn items from 2 to 40 rounds in the given map
So that the first round does not load any spawn items on 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_VERSION, FCVAR_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(id, CSW_AK47, 120)
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 120)
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
cs_set_user_bpammo(id, CSW_FLASHBANG, 3)
give_item(id, "weapon_smokegrenade")
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
}
bool:is_user_vip(id)
return !!(get_user_flags(id) & VIP_FLAG)
Last edited by rgn6; 03-05-21 at 07:58 PM.
rgn6 is online now Report Post
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 03-05-21 , 02:07 PM Re: Vip plugin
Reply With Quote Multi-Quote This Message #4
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_VERSION, FCVAR_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(id, CSW_AK47, 120)
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 120)
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
cs_set_user_bpammo(id, CSW_FLASHBANG, 3)
give_item(id, "weapon_smokegrenade")
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
}
bool:is_user_vip(id)
return !!(get_user_flags(id) & VIP_FLAG)