it still doesn't give the defuser...
PHP Code:
#include <amxmodx>
#include <engine>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <fakemeta_util>
#define MAX_PLAYERS 32
#define MAXPLAYERS 32 + 1
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
new g_awp_active
new bool:g_bHasBombSite;
#if defined DAMAGE_RECIEVED
new g_MsgSync2
#endif
public plugin_init()
{
register_plugin("VIP RO", "2.06", "Autor")
g_awp_active = register_cvar("awp_active", "1")
register_event("Damage","Damage","b")
register_event("DeathMsg","death_msg","a")
register_clcmd("awp","HandleCmd")
register_clcmd("sg550","HandleCmd")
register_clcmd("g3sg1","HandleCmd")
register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
register_event("CurWeapon", "event_CurWeaponn", "be", "1=1")
register_event("CurWeapon", "event_CurWeaponnn", "be", "1=1")
register_clcmd("say /vip","ShowMotd")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")
register_event("DeathMsg", "hook_death", "a", "1>0")
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
if( find_ent_by_class(-1, "func_bomb_target") || find_ent_by_class(-1, "info_bomb_target") ) //Checks if the map has bombsite
{
g_bHasBombSite = true; //If the map has bombsite it is set to true
}
}
public fwHamPlayerSpawnPost(id)
{
if( is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT )
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 90);
set_user_armor( id , 90)
give_item(id, "weapon_smokegrenade")
}
if( is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T )
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 90);
set_user_armor( id , 90)
give_item(id, "weapon_smokegrenade")
}
if( is_user_alive(id) && get_user_flags( id ) & ADMIN_LEVEL_H )
{
give_item(id, "weapon_hegrenade")
give_item(id, "item_assaultsuit");
set_user_maxspeed( id , get_user_maxspeed( id ) + 50.0 )
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
set_user_armor( id , get_user_armor( id ) + 50)
if(g_bHasBombSite && cs_get_user_team(id) == CS_TEAM_CT)
{
give_item(id, "item_thighpack");
}
}
}
public HandleCmd(id){
if (!get_pcvar_num(g_awp_active))
return PLUGIN_CONTINUE
if(get_user_flags(id) & ADMIN_LEVEL_H)
return PLUGIN_CONTINUE
client_print(id, print_center, "Sniperele sunt doar pentru VIP-uri !!!")
return PLUGIN_HANDLED
}
public event_CurWeapon(id)
{
if(read_data(2) == CSW_AWP)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_center, "Sniperele sunt doar pentru VIP-uri !!!")
client_cmd(id, "drop")
}
}
return PLUGIN_HANDLED
}
public event_CurWeaponn(id)
{
if(read_data(2) == CSW_SG550)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_center, "Sniperele sunt doar pentru VIP-uri !!!")
client_cmd(id, "drop")
}
}
return PLUGIN_HANDLED
}
public event_CurWeaponnn(id)
{
if(read_data(2) == CSW_G3SG1)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_center, "Sniperele sunt doar pentru VIP-uri !!!")
client_cmd(id, "drop")
}
}
return PLUGIN_HANDLED
}
public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public client_authorized(id)
{
set_task(30.0, "PrintText" ,id)
}
public PrintText(id)
{
client_print(id, print_chat, "[VIP] Scrie in chat /vip pentru a vedea beneficiile unui VIP")
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_LEVEL_H)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s VIP ONLINE: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Nu sunt VIP-uri conectate.")
print_message(user, message)
}
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
PS: Dunno's or Unkolix's codes run rly bad on my sv, I found this old code and it works fine (except the defuser thing)