|
Member
Join Date: Jan 2021
Location: USA
|
03-05-2021
, 14:07
Re: Vip plugin
|
#3
|
Quote:
Originally Posted by rgn6
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)
|
https://forums.alliedmods.net/showthread.php?t=156574
|
|
|
|