Raised This Month: $138 Target: $400
 34% 

gold vip


Post New Thread Reply   
 
Thread Tools Display Modes
grof
Member
Join Date: Jun 2017
Old 09-10-2019 , 13:56   Re: gold vip
Reply With Quote #11

Quote:
Originally Posted by DON KHAN 1 View Post
It's easy to add golden weapons just download the golden weapons plugins already exists in this forum & if u don't know to add so I will add them for u
that is problem beacuse i dont know
i dont have experiences with making plugins
please if you can make
grof is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-11-2019 , 04:54   Re: gold vip
Reply With Quote #12

there r few golden guns which u buy by typing their command.
For example: Golden AK47
Golden M4A1
Golden Deagle
__________________
Hosting Servers: Angel Of Games

Facebook
My YouTube
Join My Forum
Ro{Y}aL WarLanD CommuniTy
Angel Of Games - Forum
Currently Working On: ADVANCED VIP + API : 70%
DON KHAN 1 is offline
grof
Member
Join Date: Jun 2017
Old 09-11-2019 , 05:02   Re: gold vip
Reply With Quote #13

Quote:
Originally Posted by DON KHAN 1 View Post
there r few golden guns which u buy by typing their command.
For example: Golden AK47
Golden M4A1
Golden Deagle
can you see all default weapons in this plugin.
all these default want to replace with golds.
is that possible ?
grof is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-11-2019 , 07:08   Re: gold vip
Reply With Quote #14

Quote:
Originally Posted by grof View Post
can you see all default weapons in this plugin.
all these default want to replace with golds.
is that possible ?
Ok I will try
__________________
Hosting Servers: Angel Of Games

Facebook
My YouTube
Join My Forum
Ro{Y}aL WarLanD CommuniTy
Angel Of Games - Forum
Currently Working On: ADVANCED VIP + API : 70%
DON KHAN 1 is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-12-2019 , 03:47   Re: gold vip
Reply With Quote #15

done
Code:
/*This Plugin Is Originally Created By Dunno But Edited By DON KHAN *Added VIP Prefix, Gravity, New Style VIP MENU Etc... *Change Log: * 3.0: Dunno's Released. * After 3.0 DON KHAN's Released. * 3.1: Added Gravity. * 3.2: Added chat(player, "!g[VIP] You Got He Grenade, Armor, Thighpack.") * 3.3: Fixed All Bugs. * 3.4: Added New Style VIP Menu.  * 3.5: Added VIP Tag. * 3.6: Fixed All Bugs & Error. * 3.7: Added VIP On Scoreboard * 3.8: Optimized Code * 3.9: Added Glow For VIPs * 4.0: Added A Specific Glow Of VIP's Team: Blue For CT & Red For T + Optimized Code. */ #define DAMAGE_RECIEVED #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich>  static const COLOR[] = "!g" //green static const CONTACT[] = "www.steam.lv/forum" new maxplayers new mpd, mkb, mhb new g_MsgSync new money_add new money_hs_add new money_max new nKiller new nKiller_money new nMoney_add new nMoney_max new VIPPrefix new g_awp_active new g_menu_active new CurrentRound new bool:HasC4[33] new vips[33] new SzMaxPlayers, SzSayText; new SzGTeam[3][] = {     "Spectator",     "Terrorist",     "Counter-Terrorist" } #define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890 #if defined DAMAGE_RECIEVED     new g_MsgSync2 #endif // Guns Skin. new bool: g_has_ak[33] new bool: g_has_m4[33] new bool: g_has_dg[33] new bool: g_has_awp[33] new bool: g_has_usp[33] new AK47_V_MODEL[] = "models/ADVANCED_VIP/v_ak47.mdl" new AK47_P_MODEL[] = "models/ADVANCED_VIP/p_ak47.mdl" new M4A1_V_MODEL[] = "models/ADVANCED_VIP/v_m4a1.mdl" new M4A1_P_MODEL[] = "models/ADVANCED_VIP/p_m4a1.mdl" new DEAGLE_V_MODEL[] = "models/ADVANCED_VIP/v_deagle.mdl" new DEAGLE_P_MODEL[] = "models/ADVANCED_VIP/p_deagle.mdl"   new AWP_V_MODEL[] = "models/ADVANCED_VIP/v_awp.mdl" new AWP_P_MODEL[] = "models/ADVANCED_VIP/p_awp.mdl"   new USP_V_MODEL[] = "models/ADVANCED_VIP/v_usp.mdl" new USP_P_MODEL[] = "models/ADVANCED_VIP/p_usp.mdl"   // VIP Glow Access new const VIP_ACCESS = ADMIN_LEVEL_H // VIP Prefix #define FLAGADMINVIP ADMIN_LEVEL_H #define PREFIXADMINVIP ".::V.I.P::." // VIP Scoreboard Access #define VIP_LEVEL ADMIN_LEVEL_H public plugin_init() {     register_plugin("VIP Eng Version", "4.0", "Dunno & DON KHAN")     mpd = register_cvar("money_per_damage","3")     mkb = register_cvar("money_kill_bonus","20")     mhb = register_cvar("money_hs_bonus","50")     money_add = register_cvar("amx_vip_hp", "250")     money_hs_add = register_cvar("amx_vip_money_hs", "500")     money_max = register_cvar("amx_vip_max_money", "20000")         VIPPrefix = register_cvar("show_VIP_admin_prefix", "1")         g_awp_active = register_cvar("awp_active", "0")     g_menu_active = register_cvar("menu_active", "1")     register_event("Damage","Damage","b")     register_event("DeathMsg","death_msg","a")     register_event("ResetHUD","resethud","be") // For VIP Show In Scoreboard     register_clcmd("awp","HandleCmd")     register_clcmd("say /vipinfo","ShowMotd")     maxplayers = get_maxplayers()     register_clcmd("say", "handle_say")     register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)     register_logevent("LogEvent_RoundStart", 2, "1=Round_Start" );     register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")     register_event("TextMsg","Event_RoundRestart","a","2&#Game_C");     register_event("DeathMsg", "hook_death", "a", "1>0")     register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")     RegisterHam(Ham_Spawn, "player", "PlayerPostSpawn", 1); // For Glow Of VIP's Team.         register_clcmd("say", "hook_say")     register_clcmd("say_team", "hook_say_team")         SzSayText = get_user_msgid ("SayText")     SzMaxPlayers = get_maxplayers()         register_message(SzSayText, "MsgDuplicate")         g_MsgSync = CreateHudSyncObj() #if defined DAMAGE_RECIEVED     g_MsgSync2 = CreateHudSyncObj() #endif } public plugin_precache() {     precache_model(AK47_V_MODEL)     precache_model(AK47_P_MODEL)     precache_model(M4A1_V_MODEL)     precache_model(M4A1_P_MODEL)     precache_model(DEAGLE_V_MODEL)     precache_model(DEAGLE_P_MODEL)     precache_model(AWP_V_MODEL)     precache_model(AWP_P_MODEL)     precache_model(USP_V_MODEL)     precache_model(USP_P_MODEL) } public MsgDuplicate(id){ return PLUGIN_HANDLED; } public PlayerPostSpawn(id)  {          if(is_user_alive (id) && get_user_flags(id) & VIP_ACCESS)          set_user_rendering(id, kRenderFxGlowShell, cs_get_user_team(id) == CS_TEAM_CT ? 0 : 255, 0, cs_get_user_team(id) == CS_TEAM_CT ? 255 : 0, kRenderNormal, 16) } public on_damage(id) {     new attacker = get_user_attacker(id) #if defined DAMAGE_RECIEVED     // id should be connected if this message is sent, but lets check anyway     if ( is_user_connected(id) && is_user_connected(attacker) )     if (get_user_flags(attacker) & ADMIN_LEVEL_H)     {         new damage = read_data(2)         set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)         ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage) #else     if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )     {         new damage = read_data(2) #endif         set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)         ShowSyncHudMsg(attacker, g_MsgSync, "%i^n", damage)     } } public Damage(id) {     new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)     if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)     if (get_user_flags(attacker) & ADMIN_LEVEL_H)     {         new money = read_data(2) * get_pcvar_num(mpd)         if(hitpoint==1) money += get_pcvar_num(mhb)         cs_set_user_money(attacker,cs_get_user_money(attacker) + money)     } } public death_msg() {     if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300) } public LogEvent_RoundStart() {     CurrentRound++;     new players[32], player, pnum;     get_players(players, pnum, "a");     for(new i = 0; i < pnum; i++)     {         player = players[i];         if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H)         {             give_item(player, "weapon_hegrenade")             give_item(player, "item_assaultsuit")             give_item(player, "item_thighpack")             set_user_gravity(player, 720.0 / 800)             give_item(player,"weapon_deagle")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")                             chat(player, "!g[VIP] You Got Deagle, He Grenade, Low Gravity, Armor, Thighpack.")             if (!get_pcvar_num(g_menu_active))                 return PLUGIN_CONTINUE             if(CurrentRound >= 3)             {                 Showrod(player);             }         }     }     return PLUGIN_HANDLED } public Event_RoundRestart() {     CurrentRound=0; } public hook_death() {    // Killer id    nKiller = read_data(1)    if ( (read_data(3) == 1) && (read_data(5) == 0) )    {       nMoney_add = get_pcvar_num (money_hs_add)    }    else       nMoney_add = get_pcvar_num (money_add)    nMoney_max = get_pcvar_num (money_max)    // Updating Killer Money    if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))    return;    nKiller_money += nMoney_add    // Maximum Money check    if (nKiller_money > nMoney_max) nKiller_money = nMoney_max    // Hud message "Added +%d Money"    set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)    show_hudmessage(nKiller, "Added +%d Money", nMoney_add)    // Screen fading    message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)    write_short(1<<10)    write_short(1<<10)    write_short(0x0000)    write_byte(0)    write_byte(0)    write_byte(200)    write_byte(75)    message_end() } public Showrod(id) {     if(!is_user_connected(id) || !is_user_alive(id))         return PLUGIN_HANDLED     new menu = menu_create("\r[\y FREE VIP Guns \r]", "Pressedrod")     menu_additem(menu, "\wAK47 + Desert Eagle", "0", 0)     menu_additem(menu, "\wM4A1 + Desert Eagle^n", "1", 0)     menu_additem(menu, "\wAWP + USP", "2", 0)     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)     menu_display(id, menu, 0)     return PLUGIN_HANDLED } public Pressedrod(id, menu, item) {     new data[6], name[64]     new access, callback     menu_item_getinfo(menu, item, access, data, 5, name, 63, callback)     switch(str_to_num(data))     {         case 0:         {             if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)                 HasC4[id] = true;             else                 HasC4[id] = false;             strip_user_weapons (id)             give_item(id,"weapon_ak47")             g_has_ak[id] = true             g_has_dg[id] = true             give_item(id,"ammo_762nato")             give_item(id,"ammo_762nato")             give_item(id,"ammo_762nato")             give_item(id,"weapon_deagle")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"weapon_knife")             give_item(id,"weapon_hegrenade")             give_item(id, "weapon_smokegrenade");             give_item(id, "item_assaultsuit");             give_item(id, "item_thighpack");             chat(id, "!g[VIP]!n You Taked Free AK47 and Deagle")             if (HasC4[id])             {                 give_item(id, "weapon_c4");                 cs_set_user_plant( id );             }         }         case 1:         {             if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)                 HasC4[id] = true;             else                 HasC4[id] = false;             strip_user_weapons (id)             g_has_m4[id] = true             g_has_dg[id] = true             give_item(id,"weapon_m4a1")             give_item(id,"ammo_556nato")             give_item(id,"ammo_556nato")             give_item(id,"ammo_556nato")             give_item(id,"weapon_deagle")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"weapon_knife")             give_item(id,"weapon_hegrenade")             give_item(id, "weapon_smokegrenade");             give_item(id, "item_assaultsuit");             give_item(id, "item_thighpack");             chat(id, "!g[VIP]!n You Taked Free M4A1 and Deagle")             if (HasC4[id])             {                 give_item(id, "weapon_c4");                 cs_set_user_plant( id );             }         }         case 2:         {             if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)                 HasC4[id] = true;             else                 HasC4[id] = false;             strip_user_weapons (id)             g_has_awp[id] = true             g_has_usp[id] = true             give_item(id,"weapon_awp")             give_item(id,"ammo_338magnum")             give_item(id,"ammo_338magnum")             give_item(id,"ammo_338magnum")             give_item(id,"weapon_usp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"weapon_knife")             give_item(id,"weapon_hegrenade")             give_item(id, "weapon_smokegrenade");             give_item(id, "item_assaultsuit");             give_item(id, "item_thighpack");             chat(id, "!g[VIP]!n You Taked Free AWP and USP")             if (HasC4[id])             {                 give_item(id, "weapon_c4");                 cs_set_user_plant( id );             }         }     } } public HandleCmd(id){     if (!get_pcvar_num(g_awp_active))       return PLUGIN_CONTINUE     if(get_user_flags(id) & ADMIN_LEVEL_H)         return PLUGIN_CONTINUE     chat(id, "!g[VIP]!n Sniper's Only For VIP's")     return PLUGIN_HANDLED } public ShowMotd(id) {  show_motd(id, "vip.txt") } public client_authorized(id) {  set_task(40.0, "PrintText" ,id) } public PrintText(id) {  chat(id, "!g[VIP]!n Write!g /vipinfo!n To See VIP Privileges!") } 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 ) {                 chat(user, message)                 len = format(message, 255, "%s ",COLOR)             }         }         chat(user, message)     }     else {         len += format(message[len], 255-len, "No VIP online.")         chat(user, message)     }     get_cvar_string("amx_contactinfo", contact, 63)     if(contact[0])  {         format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)         chat(user, contactinfo)     } } public hook_say(id) {     new SzMessages[192], SzName[32];     new SzAlive = is_user_alive(id);     new SzGetFlag = get_user_flags(id);         read_args(SzMessages, 191);     remove_quotes(SzMessages);     get_user_name(id, SzName, 31);         if(!is_valid_msg(SzMessages))        return PLUGIN_CONTINUE;             if(get_pcvar_num(VIPPrefix) && SzGetFlag & FLAGADMINVIP)(SzAlive ? format(SzMessages, 191, "^4[%s] ^3%s : ^4%s", PREFIXADMINVIP, SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^4[%s] ^3%s : ^4%s", PREFIXADMINVIP, SzName, SzMessages));     else if(get_pcvar_num(VIPPrefix) && !(SzGetFlag & FLAGADMINVIP))(SzAlive ? format(SzMessages, 191, "^3%s : ^1%s", SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^3%s : ^1%s", SzName, SzMessages));     for(new i = 1; i <= SzMaxPlayers; i++)         {             if(!is_user_connected(i))                 continue;                     if(SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))                 {                     message_begin(MSG_ONE, get_user_msgid("SayText"), {0, 0, 0}, i);                     write_byte(id);                     write_string(SzMessages);                     message_end();                 }         }     return PLUGIN_CONTINUE; } public hook_say_team(id){     new SzMessages[192], SzName[32];     new SzAlive = is_user_alive(id);     new SzGetFlag = get_user_flags(id);     new SzGetTeam = get_user_team(id);     read_args(SzMessages, 191);     remove_quotes(SzMessages);     get_user_name(id, SzName, 31);       if(!is_valid_msg(SzMessages))     return PLUGIN_CONTINUE;             if(get_pcvar_num(VIPPrefix) && SzGetFlag & FLAGADMINVIP)(SzAlive ? format(SzMessages, 191, "^1(%s) ^4[%s] ^3%s : ^4%s", SzGTeam[SzGetTeam], PREFIXADMINVIP, SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^1(%s) ^4[%s] ^3%s : ^4%s", SzGTeam[SzGetTeam], VIPPrefix, SzName, SzMessages));     else if(get_pcvar_num(VIPPrefix) && !(SzGetFlag & FLAGADMINVIP))(SzAlive ? format(SzMessages, 191, "^1(%s) ^3%s : ^1%s", SzGTeam[SzGetTeam], SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^1(%s) ^3%s : ^1%s", SzGTeam[SzGetTeam], SzName, SzMessages));     for(new i = 1; i <= SzMaxPlayers; i++)         {             if(!is_user_connected(i))                 continue;                         if(get_user_team(i) != SzGetTeam)                 continue;                         if(SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))                 {                     message_begin(MSG_ONE, get_user_msgid("SayText"), {0, 0, 0}, i);                     write_byte(id);                     write_string(SzMessages);                     message_end();                 }         }     return PLUGIN_CONTINUE; } bool:is_valid_msg(const SzMessages[]){     if( SzMessages[0] == '@'     || !strlen(SzMessages)){ return false; }     return true; } public client_putinserver(id) {     if(access(id,VIP_LEVEL))     {         vips[id] = true     } } public client_disconnect(id) {     if( vips[id] )     {         vips[id] = false     } } public resethud(id) {     if( vips[id] )     {         set_user_scoreattrib(id,4)     } } stock set_user_scoreattrib(id,attrib=0) {     message_begin(2,get_user_msgid("ScoreAttrib"),{0,0,0},0);     write_byte(id);     write_byte(attrib);     message_end(); }  stock chat(const id, const input[], any:...) {     new count = 1, players[32];     static msg[191];     vformat(msg, 190, input, 3);     replace_all(msg, 190, "!g", "^4");     replace_all(msg, 190, "!n", "^1");     replace_all(msg, 190, "!t", "^3");     if(id) players[0] = id;     else get_players(players, count, "ch"); {         for(new i = 0; i < count; i++) {             if(is_user_connected(players[i])) {                 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);                 write_byte(players[i]);                 write_string(msg);                 message_end();             }         }     } }
not tested.
__________________
Hosting Servers: Angel Of Games

Facebook
My YouTube
Join My Forum
Ro{Y}aL WarLanD CommuniTy
Angel Of Games - Forum
Currently Working On: ADVANCED VIP + API : 70%
DON KHAN 1 is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-12-2019 , 04:00   Re: gold vip
Reply With Quote #16

Quote:
Originally Posted by DON KHAN 1 View Post
done
Code:
/*This Plugin Is Originally Created By Dunno But Edited By DON KHAN *Added VIP Prefix, Gravity, New Style VIP MENU Etc... *Change Log: * 3.0: Dunno's Released. * After 3.0 DON KHAN's Released. * 3.1: Added Gravity. * 3.2: Added chat(player, "!g[VIP] You Got He Grenade, Armor, Thighpack.") * 3.3: Fixed All Bugs. * 3.4: Added New Style VIP Menu.  * 3.5: Added VIP Tag. * 3.6: Fixed All Bugs & Error. * 3.7: Added VIP On Scoreboard * 3.8: Optimized Code * 3.9: Added Glow For VIPs * 4.0: Added A Specific Glow Of VIP's Team: Blue For CT & Red For T + Optimized Code. */ #define DAMAGE_RECIEVED #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich>  static const COLOR[] = "!g" //green static const CONTACT[] = "www.steam.lv/forum" new maxplayers new mpd, mkb, mhb new g_MsgSync new money_add new money_hs_add new money_max new nKiller new nKiller_money new nMoney_add new nMoney_max new VIPPrefix new g_awp_active new g_menu_active new CurrentRound new bool:HasC4[33] new vips[33] new SzMaxPlayers, SzSayText; new SzGTeam[3][] = {     "Spectator",     "Terrorist",     "Counter-Terrorist" } #define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890 #if defined DAMAGE_RECIEVED     new g_MsgSync2 #endif // Guns Skin. new bool: g_has_ak[33] new bool: g_has_m4[33] new bool: g_has_dg[33] new bool: g_has_awp[33] new bool: g_has_usp[33] new AK47_V_MODEL[] = "models/ADVANCED_VIP/v_ak47.mdl" new AK47_P_MODEL[] = "models/ADVANCED_VIP/p_ak47.mdl" new M4A1_V_MODEL[] = "models/ADVANCED_VIP/v_m4a1.mdl" new M4A1_P_MODEL[] = "models/ADVANCED_VIP/p_m4a1.mdl" new DEAGLE_V_MODEL[] = "models/ADVANCED_VIP/v_deagle.mdl" new DEAGLE_P_MODEL[] = "models/ADVANCED_VIP/p_deagle.mdl"   new AWP_V_MODEL[] = "models/ADVANCED_VIP/v_awp.mdl" new AWP_P_MODEL[] = "models/ADVANCED_VIP/p_awp.mdl"   new USP_V_MODEL[] = "models/ADVANCED_VIP/v_usp.mdl" new USP_P_MODEL[] = "models/ADVANCED_VIP/p_usp.mdl"   // VIP Glow Access new const VIP_ACCESS = ADMIN_LEVEL_H // VIP Prefix #define FLAGADMINVIP ADMIN_LEVEL_H #define PREFIXADMINVIP ".::V.I.P::." // VIP Scoreboard Access #define VIP_LEVEL ADMIN_LEVEL_H public plugin_init() {     register_plugin("VIP Eng Version", "4.0", "Dunno & DON KHAN")     mpd = register_cvar("money_per_damage","3")     mkb = register_cvar("money_kill_bonus","20")     mhb = register_cvar("money_hs_bonus","50")     money_add = register_cvar("amx_vip_hp", "250")     money_hs_add = register_cvar("amx_vip_money_hs", "500")     money_max = register_cvar("amx_vip_max_money", "20000")         VIPPrefix = register_cvar("show_VIP_admin_prefix", "1")         g_awp_active = register_cvar("awp_active", "0")     g_menu_active = register_cvar("menu_active", "1")     register_event("Damage","Damage","b")     register_event("DeathMsg","death_msg","a")     register_event("ResetHUD","resethud","be") // For VIP Show In Scoreboard     register_clcmd("awp","HandleCmd")     register_clcmd("say /vipinfo","ShowMotd")     maxplayers = get_maxplayers()     register_clcmd("say", "handle_say")     register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)     register_logevent("LogEvent_RoundStart", 2, "1=Round_Start" );     register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")     register_event("TextMsg","Event_RoundRestart","a","2&#Game_C");     register_event("DeathMsg", "hook_death", "a", "1>0")     register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")     RegisterHam(Ham_Spawn, "player", "PlayerPostSpawn", 1); // For Glow Of VIP's Team.         register_clcmd("say", "hook_say")     register_clcmd("say_team", "hook_say_team")         SzSayText = get_user_msgid ("SayText")     SzMaxPlayers = get_maxplayers()         register_message(SzSayText, "MsgDuplicate")         g_MsgSync = CreateHudSyncObj() #if defined DAMAGE_RECIEVED     g_MsgSync2 = CreateHudSyncObj() #endif } public plugin_precache() {     precache_model(AK47_V_MODEL)     precache_model(AK47_P_MODEL)     precache_model(M4A1_V_MODEL)     precache_model(M4A1_P_MODEL)     precache_model(DEAGLE_V_MODEL)     precache_model(DEAGLE_P_MODEL)     precache_model(AWP_V_MODEL)     precache_model(AWP_P_MODEL)     precache_model(USP_V_MODEL)     precache_model(USP_P_MODEL) } public MsgDuplicate(id){ return PLUGIN_HANDLED; } public PlayerPostSpawn(id)  {          if(is_user_alive (id) && get_user_flags(id) & VIP_ACCESS)          set_user_rendering(id, kRenderFxGlowShell, cs_get_user_team(id) == CS_TEAM_CT ? 0 : 255, 0, cs_get_user_team(id) == CS_TEAM_CT ? 255 : 0, kRenderNormal, 16) } public on_damage(id) {     new attacker = get_user_attacker(id) #if defined DAMAGE_RECIEVED     // id should be connected if this message is sent, but lets check anyway     if ( is_user_connected(id) && is_user_connected(attacker) )     if (get_user_flags(attacker) & ADMIN_LEVEL_H)     {         new damage = read_data(2)         set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)         ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage) #else     if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )     {         new damage = read_data(2) #endif         set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)         ShowSyncHudMsg(attacker, g_MsgSync, "%i^n", damage)     } } public Damage(id) {     new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)     if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)     if (get_user_flags(attacker) & ADMIN_LEVEL_H)     {         new money = read_data(2) * get_pcvar_num(mpd)         if(hitpoint==1) money += get_pcvar_num(mhb)         cs_set_user_money(attacker,cs_get_user_money(attacker) + money)     } } public death_msg() {     if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300) } public LogEvent_RoundStart() {     CurrentRound++;     new players[32], player, pnum;     get_players(players, pnum, "a");     for(new i = 0; i < pnum; i++)     {         player = players[i];         if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H)         {             give_item(player, "weapon_hegrenade")             give_item(player, "item_assaultsuit")             give_item(player, "item_thighpack")             set_user_gravity(player, 720.0 / 800)             give_item(player,"weapon_deagle")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")             give_item(player,"ammo_50ae")                             chat(player, "!g[VIP] You Got Deagle, He Grenade, Low Gravity, Armor, Thighpack.")             if (!get_pcvar_num(g_menu_active))                 return PLUGIN_CONTINUE             if(CurrentRound >= 3)             {                 Showrod(player);             }         }     }     return PLUGIN_HANDLED } public Event_RoundRestart() {     CurrentRound=0; } public hook_death() {    // Killer id    nKiller = read_data(1)    if ( (read_data(3) == 1) && (read_data(5) == 0) )    {       nMoney_add = get_pcvar_num (money_hs_add)    }    else       nMoney_add = get_pcvar_num (money_add)    nMoney_max = get_pcvar_num (money_max)    // Updating Killer Money    if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))    return;    nKiller_money += nMoney_add    // Maximum Money check    if (nKiller_money > nMoney_max) nKiller_money = nMoney_max    // Hud message "Added +%d Money"    set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)    show_hudmessage(nKiller, "Added +%d Money", nMoney_add)    // Screen fading    message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)    write_short(1<<10)    write_short(1<<10)    write_short(0x0000)    write_byte(0)    write_byte(0)    write_byte(200)    write_byte(75)    message_end() } public Showrod(id) {     if(!is_user_connected(id) || !is_user_alive(id))         return PLUGIN_HANDLED     new menu = menu_create("\r[\y FREE VIP Guns \r]", "Pressedrod")     menu_additem(menu, "\wAK47 + Desert Eagle", "0", 0)     menu_additem(menu, "\wM4A1 + Desert Eagle^n", "1", 0)     menu_additem(menu, "\wAWP + USP", "2", 0)     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)     menu_display(id, menu, 0)     return PLUGIN_HANDLED } public Pressedrod(id, menu, item) {     new data[6], name[64]     new access, callback     menu_item_getinfo(menu, item, access, data, 5, name, 63, callback)     switch(str_to_num(data))     {         case 0:         {             if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)                 HasC4[id] = true;             else                 HasC4[id] = false;             strip_user_weapons (id)             give_item(id,"weapon_ak47")             g_has_ak[id] = true             g_has_dg[id] = true             give_item(id,"ammo_762nato")             give_item(id,"ammo_762nato")             give_item(id,"ammo_762nato")             give_item(id,"weapon_deagle")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"weapon_knife")             give_item(id,"weapon_hegrenade")             give_item(id, "weapon_smokegrenade");             give_item(id, "item_assaultsuit");             give_item(id, "item_thighpack");             chat(id, "!g[VIP]!n You Taked Free AK47 and Deagle")             if (HasC4[id])             {                 give_item(id, "weapon_c4");                 cs_set_user_plant( id );             }         }         case 1:         {             if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)                 HasC4[id] = true;             else                 HasC4[id] = false;             strip_user_weapons (id)             g_has_m4[id] = true             g_has_dg[id] = true             give_item(id,"weapon_m4a1")             give_item(id,"ammo_556nato")             give_item(id,"ammo_556nato")             give_item(id,"ammo_556nato")             give_item(id,"weapon_deagle")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"weapon_knife")             give_item(id,"weapon_hegrenade")             give_item(id, "weapon_smokegrenade");             give_item(id, "item_assaultsuit");             give_item(id, "item_thighpack");             chat(id, "!g[VIP]!n You Taked Free M4A1 and Deagle")             if (HasC4[id])             {                 give_item(id, "weapon_c4");                 cs_set_user_plant( id );             }         }         case 2:         {             if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)                 HasC4[id] = true;             else                 HasC4[id] = false;             strip_user_weapons (id)             g_has_awp[id] = true             g_has_usp[id] = true             give_item(id,"weapon_awp")             give_item(id,"ammo_338magnum")             give_item(id,"ammo_338magnum")             give_item(id,"ammo_338magnum")             give_item(id,"weapon_usp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"ammo_45acp")             give_item(id,"weapon_knife")             give_item(id,"weapon_hegrenade")             give_item(id, "weapon_smokegrenade");             give_item(id, "item_assaultsuit");             give_item(id, "item_thighpack");             chat(id, "!g[VIP]!n You Taked Free AWP and USP")             if (HasC4[id])             {                 give_item(id, "weapon_c4");                 cs_set_user_plant( id );             }         }     } } public HandleCmd(id){     if (!get_pcvar_num(g_awp_active))       return PLUGIN_CONTINUE     if(get_user_flags(id) & ADMIN_LEVEL_H)         return PLUGIN_CONTINUE     chat(id, "!g[VIP]!n Sniper's Only For VIP's")     return PLUGIN_HANDLED } public ShowMotd(id) {  show_motd(id, "vip.txt") } public client_authorized(id) {  set_task(40.0, "PrintText" ,id) } public PrintText(id) {  chat(id, "!g[VIP]!n Write!g /vipinfo!n To See VIP Privileges!") } 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 ) {                 chat(user, message)                 len = format(message, 255, "%s ",COLOR)             }         }         chat(user, message)     }     else {         len += format(message[len], 255-len, "No VIP online.")         chat(user, message)     }     get_cvar_string("amx_contactinfo", contact, 63)     if(contact[0])  {         format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)         chat(user, contactinfo)     } } public hook_say(id) {     new SzMessages[192], SzName[32];     new SzAlive = is_user_alive(id);     new SzGetFlag = get_user_flags(id);         read_args(SzMessages, 191);     remove_quotes(SzMessages);     get_user_name(id, SzName, 31);         if(!is_valid_msg(SzMessages))        return PLUGIN_CONTINUE;             if(get_pcvar_num(VIPPrefix) && SzGetFlag & FLAGADMINVIP)(SzAlive ? format(SzMessages, 191, "^4[%s] ^3%s : ^4%s", PREFIXADMINVIP, SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^4[%s] ^3%s : ^4%s", PREFIXADMINVIP, SzName, SzMessages));     else if(get_pcvar_num(VIPPrefix) && !(SzGetFlag & FLAGADMINVIP))(SzAlive ? format(SzMessages, 191, "^3%s : ^1%s", SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^3%s : ^1%s", SzName, SzMessages));     for(new i = 1; i <= SzMaxPlayers; i++)         {             if(!is_user_connected(i))                 continue;                     if(SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))                 {                     message_begin(MSG_ONE, get_user_msgid("SayText"), {0, 0, 0}, i);                     write_byte(id);                     write_string(SzMessages);                     message_end();                 }         }     return PLUGIN_CONTINUE; } public hook_say_team(id){     new SzMessages[192], SzName[32];     new SzAlive = is_user_alive(id);     new SzGetFlag = get_user_flags(id);     new SzGetTeam = get_user_team(id);     read_args(SzMessages, 191);     remove_quotes(SzMessages);     get_user_name(id, SzName, 31);       if(!is_valid_msg(SzMessages))     return PLUGIN_CONTINUE;             if(get_pcvar_num(VIPPrefix) && SzGetFlag & FLAGADMINVIP)(SzAlive ? format(SzMessages, 191, "^1(%s) ^4[%s] ^3%s : ^4%s", SzGTeam[SzGetTeam], PREFIXADMINVIP, SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^1(%s) ^4[%s] ^3%s : ^4%s", SzGTeam[SzGetTeam], VIPPrefix, SzName, SzMessages));     else if(get_pcvar_num(VIPPrefix) && !(SzGetFlag & FLAGADMINVIP))(SzAlive ? format(SzMessages, 191, "^1(%s) ^3%s : ^1%s", SzGTeam[SzGetTeam], SzName, SzMessages) : format(SzMessages, 191, "^1*DEAD* ^1(%s) ^3%s : ^1%s", SzGTeam[SzGetTeam], SzName, SzMessages));     for(new i = 1; i <= SzMaxPlayers; i++)         {             if(!is_user_connected(i))                 continue;                         if(get_user_team(i) != SzGetTeam)                 continue;                         if(SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))                 {                     message_begin(MSG_ONE, get_user_msgid("SayText"), {0, 0, 0}, i);                     write_byte(id);                     write_string(SzMessages);                     message_end();                 }         }     return PLUGIN_CONTINUE; } bool:is_valid_msg(const SzMessages[]){     if( SzMessages[0] == '@'     || !strlen(SzMessages)){ return false; }     return true; } public client_putinserver(id) {     if(access(id,VIP_LEVEL))     {         vips[id] = true     } } public client_disconnect(id) {     if( vips[id] )     {         vips[id] = false     } } public resethud(id) {     if( vips[id] )     {         set_user_scoreattrib(id,4)     } } stock set_user_scoreattrib(id,attrib=0) {     message_begin(2,get_user_msgid("ScoreAttrib"),{0,0,0},0);     write_byte(id);     write_byte(attrib);     message_end(); }  stock chat(const id, const input[], any:...) {     new count = 1, players[32];     static msg[191];     vformat(msg, 190, input, 3);     replace_all(msg, 190, "!g", "^4");     replace_all(msg, 190, "!n", "^1");     replace_all(msg, 190, "!t", "^3");     if(id) players[0] = id;     else get_players(players, count, "ch"); {         for(new i = 0; i < count; i++) {             if(is_user_connected(players[i])) {                 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);                 write_byte(players[i]);                 write_string(msg);                 message_end();             }         }     } }
not tested.
I don't see anything about weapon skin changing , your just addressing some models and preaching them , but not using them. take a look to this example : https://forums.alliedmods.net/showpo...13&postcount=9

Last edited by LearninG; 09-12-2019 at 04:05.
LearninG is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-12-2019 , 08:34   Re: gold vip
Reply With Quote #17

oh i forgot to use CurWeapon engine
PHP Code:
/*This Plugin Is Originally Created By Dunno But Edited By DON KHAN
*Added VIP Prefix, Gravity, New Style VIP MENU Etc...
*Change Log:
* 3.0: Dunno's Released.
* After 3.0 DON KHAN's Released.
* 3.1: Added Gravity.
* 3.2: Added chat(player, "!g[VIP] You Got He Grenade, Armor, Thighpack.")
* 3.3: Fixed All Bugs.
* 3.4: Added New Style VIP Menu.  
* 3.5: Added VIP Tag.
* 3.6: Fixed All Bugs & Error.
* 3.7: Added VIP On Scoreboard
* 3.8: Optimized Code
* 3.9: Added Glow For VIPs
* 4.0: Added A Specific Glow Of VIP's Team: Blue For CT & Red For T + Optimized Code.
*/

#define DAMAGE_RECIEVED 
#include <amxmodx> 
#include <amxmisc> 
#include <engine>
#include <cstrike> 
#include <fun>
#include <hamsandwich>  

static const COLOR[] = "!g" //green 
static const CONTACT[] = "www.steam.lv/forum" 
new maxplayers 
new mpdmkbmhb 
new g_MsgSync 
new money_add 
new money_hs_add 
new money_max 
new nKiller 
new nKiller_money 
new nMoney_add 
new nMoney_max 
new VIPPrefix 
new g_awp_active 
new g_menu_active 
new CurrentRound
new bool:HasC4[33
new 
vips[33]

new 
SzMaxPlayersSzSayText;

new 
SzGTeam[3][] = {
    
"Spectator",
    
"Terrorist",
    
"Counter-Terrorist"
}

#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890 
#if defined DAMAGE_RECIEVED 
    
new g_MsgSync2 
#endif 

// Guns Skin Thanks To LearninG For His Weapons Model Code.
new NOT_GOLDEN[][] =
{
        
"weapon_knife",
        
"weapon_c4",   
        
"weapon_p228"
        
"weapon_mp5navy",
        
"weapon_ump45",
        
"weapon_scout",            
        
"weapon_hegrenad",
        
"weapon_flashban",
        
"weapon_smokegre"
}
new 
MODELS[][] =
{
        
"models/Knife_vip/v_m4a1.mdl",
        
"models/Knife_vip/p_m4a1.mdl",
        
"models/Knife_vip/v_ak47.mdl",
        
"models/Knife_vip/p_ak47.mdl",
        
"models/Knife_vip/v_deagle.mdl",
        
"models/Knife_vip/p_deagle.mdl",
        
"models/Knife_vip/v_aug.mdl",
        
"models/Knife_vip/p_aug.mdl",
        
"models/Knife_vip/v_awp.mdl",
        
"models/Knife_vip/p_awp.mdl",
        
"models/Knife_vip/v_famas.mdl",
        
"models/Knife_vip/p_famas.mdl",
        
"models/Knife_vip/v_g3sg1.mdl",
        
"models/Knife_vip/p_g3sg1.mdl" ,
        
"models/Knife_vip/v_galil.mdl" ,
        
"models/Knife_vip/p_galil.mdl" ,
        
"models/Knife_vip/v_elite.mdl" ,
        
"models/Knife_vip/p_elite.mdl" ,
        
"models/Knife_vip/v_glock18.mdl" ,
        
"models/Knife_vip/p_glock18.mdl" ,
        
"models/Knife_vip/v_m249.mdl" ,
        
"models/Knife_vip/p_m249.mdl" ,
        
"models/Knife_vip/v_mac10.mdl" ,
        
"models/Knife_vip/p_mac10.mdl" ,
        
"models/Knife_vip/v_mp5.mdl" ,
        
"models/Knife_vip/p_mp5.mdl" ,
        
"models/Knife_vip/v_p90.mdl",
        
"models/Knife_vip/p_p90.mdl" ,
        
"models/Knife_vip/v_sg550.mdl",
        
"models/Knife_vip/p_sg550.mdl" ,
        
"models/Knife_vip/v_sg552.mdl",
        
"models/Knife_vip/p_sg552.mdl" ,
        
"models/Knife_vip/v_usp.mdl" ,
        
"models/Knife_vip/p_usp.mdl" ,
        
"models/Knife_vip/v_xm1014.mdl" ,
        
"models/Knife_vip/p_xm1014.mdl" ,
        
"models/Knife_vip/v_m3.mdl" ,
        
"models/Knife_vip/p_m3.mdl"
}

// VIP Glow Access
new const VIP_ACCESS ADMIN_LEVEL_H 

// VIP Prefix
#define FLAGADMINVIP ADMIN_LEVEL_H
#define PREFIXADMINVIP ".::V.I.P::."

// VIP Scoreboard Access
#define VIP_LEVEL ADMIN_LEVEL_H

public plugin_init() 

    
register_plugin("VIP Eng Version""4.0""Dunno & DON KHAN"
    
mpd register_cvar("money_per_damage","3"
    
mkb register_cvar("money_kill_bonus","20"
    
mhb register_cvar("money_hs_bonus","50"
    
money_add register_cvar("amx_vip_hp""250"
    
money_hs_add register_cvar("amx_vip_money_hs""500"
    
money_max register_cvar("amx_vip_max_money""20000"
    
    
VIPPrefix register_cvar("show_VIP_admin_prefix""1")
    
    
g_awp_active register_cvar("awp_active""0"
    
g_menu_active register_cvar("menu_active""1"
    
register_event("Damage","Damage","b"
    
register_event("DeathMsg","death_msg","a"
    
register_event("ResetHUD","resethud","be"// For VIP Show In Scoreboard
    
register_clcmd("awp","HandleCmd"
    
register_clcmd("say /vipinfo","ShowMotd"
    
maxplayers get_maxplayers() 
    
register_clcmd("say""handle_say"
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER
    
register_logevent("LogEvent_RoundStart"2"1=Round_Start" ); 
    
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w"
    
register_event("TextMsg","Event_RoundRestart","a","2&#Game_C"); 
    
register_event("DeathMsg""hook_death""a""1>0"
    
register_event("Damage""on_damage""b""2!0""3=0""4!0")
    
RegisterHam(Ham_Spawn"player""PlayerPostSpawn"1); // For Glow Of VIP's Team.
    
register_event("CurWeapon""checkWeapon""be","1=1")
    
    
register_clcmd("say""hook_say")
    
register_clcmd("say_team""hook_say_team")
    
    
SzSayText get_user_msgid ("SayText")
    
SzMaxPlayers get_maxplayers()
    
    
register_message(SzSayText"MsgDuplicate")
    
    
g_MsgSync CreateHudSyncObj() 
#if defined DAMAGE_RECIEVED 
    
g_MsgSync2 CreateHudSyncObj() 
#endif 


public 
plugin_precache() 
{
        for (new 
ii<sizeof MODELSi++)
        {
                
precache_model(MODELS[i])
        }

}
public 
checkWeapon(id)
{
        static 
wpnName[16] , vmodel[32] , pmodel[32]
        
get_weaponname(get_user_weapon(id) , wpnName charsmax(wpnName))
        for (new 
ii<sizeof NOT_GOLDENi++)
        {
                if (
equali(wpnName NOT_GOLDEN[i]))
                return 
PLUGIN_HANDLED
        
}
        
copy(vmodel charsmax(vmodel) , wpnName)
        
replace_all(vmodelcharsmax(vmodel), "weapon_""")
        
copy(pmodel charsmax(pmodel) , vmodel)
        
format(vmodel charsmax(vmodel) , "models/Knife_vip/v_%s.mdl" vmodel)
        
format(pmodel charsmax(pmodel) , "models/Knife_vip/p_%s.mdl" pmodel)


        
entity_set_string(idEV_SZ_viewmodel vmodel)
        
entity_set_string(idEV_SZ_weaponmodelpmodel)
        return 
PLUGIN_CONTINUE
}
public 
MsgDuplicate(id){ return PLUGIN_HANDLED; }

public 
PlayerPostSpawn(id)  
{      
    if(
is_user_alive (id) && get_user_flags(id) & VIP_ACCESS)  
        
set_user_rendering(idkRenderFxGlowShellcs_get_user_team(id) == CS_TEAM_CT 2550cs_get_user_team(id) == CS_TEAM_CT 255 0kRenderNormal16)
}

public 
on_damage(id

    new 
attacker get_user_attacker(id

#if defined DAMAGE_RECIEVED 
    // id should be connected if this message is sent, but lets check anyway 
    
if ( is_user_connected(id) && is_user_connected(attacker) ) 
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    { 
        new 
damage read_data(2

        
set_hudmessage(255000.450.5020.14.00.10.1, -1
        
ShowSyncHudMsg(idg_MsgSync2"%i^n"damage
#else 
    
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) ) 
    { 
        new 
damage read_data(2
#endif 
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1
        
ShowSyncHudMsg(attackerg_MsgSync"%i^n"damage
    } 


public 
Damage(id

    new 
weaponhitpointattacker get_user_attacker(id,weapon,hitpoint
    if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    { 
        new 
money read_data(2) * get_pcvar_num(mpd
        if(
hitpoint==1money += get_pcvar_num(mhb
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money
    } 


public 
death_msg() 

    if(
read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300


public 
LogEvent_RoundStart() 

    
CurrentRound++; 
    new 
players[32], playerpnum
    
get_players(playerspnum"a"); 
    for(new 
0pnumi++) 
    { 
        
player players[i]; 
        if(
is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H
        { 
            
give_item(player"weapon_hegrenade"
            
give_item(player"item_assaultsuit"
            
give_item(player"item_thighpack"
            
set_user_gravity(player720.0 800)
            
give_item(player,"weapon_deagle"
            
give_item(player,"ammo_50ae"
            
give_item(player,"ammo_50ae"
            
give_item(player,"ammo_50ae"
            
give_item(player,"ammo_50ae"
            
give_item(player,"ammo_50ae"
            
give_item(player,"ammo_50ae"
            
give_item(player,"ammo_50ae")
            
    
            
chat(player"!g[VIP] You Got Deagle, He Grenade, Low Gravity, Armor, Thighpack.")

            if (!
get_pcvar_num(g_menu_active)) 
                return 
PLUGIN_CONTINUE 

            
if(CurrentRound >= 3
            { 
                
Showrod(player); 
            } 
        } 
    } 
    return 
PLUGIN_HANDLED 


public 
Event_RoundRestart() 

    
CurrentRound=0


public 
hook_death() 

   
// Killer id 
   
nKiller read_data(1

   if ( (
read_data(3) == 1) && (read_data(5) == 0) ) 
   { 
      
nMoney_add get_pcvar_num (money_hs_add
   } 
   else 
      
nMoney_add get_pcvar_num (money_add
   
nMoney_max get_pcvar_num (money_max
   
// Updating Killer Money 
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H)) 
   return; 

   
nKiller_money += nMoney_add 
   
// Maximum Money check 
   
if (nKiller_money nMoney_maxnKiller_money nMoney_max 
   
// Hud message "Added +%d Money" 
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1
   
show_hudmessage(nKiller"Added +%d Money"nMoney_add
   
// Screen fading 
   
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller
   
write_short(1<<10
   
write_short(1<<10
   
write_short(0x0000
   
write_byte(0
   
write_byte(0
   
write_byte(200
   
write_byte(75
   
message_end() 



public 
Showrod(id

    if(!
is_user_connected(id) || !is_user_alive(id)) 
        return 
PLUGIN_HANDLED 

    
new menu menu_create("\r[\y FREE VIP Guns \r]""Pressedrod"

    
menu_additem(menu"\wAK47 + Desert Eagle""0"0

    
menu_additem(menu"\wM4A1 + Desert Eagle^n""1"0)

    
menu_additem(menu"\wAWP + USP""2"0

    
menu_setprop(menuMPROP_EXITMEXIT_ALL
    
menu_display(idmenu0
    return 
PLUGIN_HANDLED 

public 
Pressedrod(idmenuitem

    new 
data[6], name[64
    new 
accesscallback 
    menu_item_getinfo
(menuitemaccessdata5name63callback
    switch(
str_to_num(data)) 
    { 
        case 
0
        { 
            if (
user_has_weapon(idCSW_C4) && get_user_team(id) == 1
                
HasC4[id] = true
            else 
                
HasC4[id] = false

            
strip_user_weapons (id
            
give_item(id,"weapon_ak47")
            
give_item(id,"ammo_762nato"
            
give_item(id,"ammo_762nato"
            
give_item(id,"ammo_762nato"
            
give_item(id,"weapon_deagle"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"weapon_knife"
            
give_item(id,"weapon_hegrenade"
            
give_item(id"weapon_smokegrenade"); 
            
give_item(id"item_assaultsuit"); 
            
give_item(id"item_thighpack"); 
            
chat(id"!g[VIP]!n You Taked Free AK47 and Deagle"

            if (
HasC4[id]) 
            { 
                
give_item(id"weapon_c4"); 
                
cs_set_user_plantid ); 
            } 
        } 
        case 
1
        { 
            if (
user_has_weapon(idCSW_C4) && get_user_team(id) == 1
                
HasC4[id] = true
            else 
                
HasC4[id] = false

            
strip_user_weapons (id)
            
give_item(id,"weapon_m4a1"
            
give_item(id,"ammo_556nato"
            
give_item(id,"ammo_556nato"
            
give_item(id,"ammo_556nato"
            
give_item(id,"weapon_deagle"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"ammo_50ae"
            
give_item(id,"weapon_knife"
            
give_item(id,"weapon_hegrenade"
            
give_item(id"weapon_smokegrenade"); 
            
give_item(id"item_assaultsuit"); 
            
give_item(id"item_thighpack"); 
            
chat(id"!g[VIP]!n You Taked Free M4A1 and Deagle"

            if (
HasC4[id]) 
            { 
                
give_item(id"weapon_c4"); 
                
cs_set_user_plantid ); 
            } 
        } 
        case 
2
        { 
            if (
user_has_weapon(idCSW_C4) && get_user_team(id) == 1
                
HasC4[id] = true
            else 
                
HasC4[id] = false

            
strip_user_weapons (id)
            
give_item(id,"weapon_awp"
            
give_item(id,"ammo_338magnum"
            
give_item(id,"ammo_338magnum"
            
give_item(id,"ammo_338magnum"
            
give_item(id,"weapon_usp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"ammo_45acp"
            
give_item(id,"weapon_knife"
            
give_item(id,"weapon_hegrenade"
            
give_item(id"weapon_smokegrenade"); 
            
give_item(id"item_assaultsuit"); 
            
give_item(id"item_thighpack"); 
            
chat(id"!g[VIP]!n You Taked Free AWP and USP"

            if (
HasC4[id]) 
            { 
                
give_item(id"weapon_c4"); 
                
cs_set_user_plantid ); 
            } 
        }
    }
}
public 
HandleCmd(id){ 
    if (!
get_pcvar_num(g_awp_active)) 
      return 
PLUGIN_CONTINUE 
    
if(get_user_flags(id) & ADMIN_LEVEL_H
        return 
PLUGIN_CONTINUE 
    chat
(id"!g[VIP]!n Sniper's Only For VIP's"
    return 
PLUGIN_HANDLED 


public 
ShowMotd(id

 
show_motd(id"vip.txt"

public 
client_authorized(id

 
set_task(40.0"PrintText" ,id

public 
PrintText(id

 
chat(id"!g[VIP]!n Write!g /vipinfo!n To See VIP Privileges!"


public 
handle_say(id) { 
    new 
said[192
    
read_args(said,192
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/vips") != -
        
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 
idcountxlen 

    
for(id id <= maxplayers id++) 
        if(
is_user_connected(id)) 
            if(
get_user_flags(id) & ADMIN_LEVEL_H
                
get_user_name(idadminnames[count++], 31

    
len format(message255"%s VIP ONLINE: ",COLOR
    if(
count 0) { 
        for(
count x++) { 
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":""
            if(
len 96 ) { 
                
chat(usermessage
                
len format(message255"%s ",COLOR
            } 
        } 
        
chat(usermessage
    } 
    else { 
        
len += format(message[len], 255-len"No VIP online."
        
chat(usermessage
    } 

    
get_cvar_string("amx_contactinfo"contact63
    if(
contact[0])  { 
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact
        
chat(usercontactinfo
    } 


public 
hook_say(id)
{
    new 
SzMessages[192], SzName[32];
    new 
SzAlive is_user_alive(id);
    new 
SzGetFlag get_user_flags(id);
    
    
read_args(SzMessages191);
    
remove_quotes(SzMessages);
    
get_user_name(idSzName31);
    

    if(!
is_valid_msg(SzMessages))    
    return 
PLUGIN_CONTINUE;
        
    if(
get_pcvar_num(VIPPrefix) && SzGetFlag FLAGADMINVIP)(SzAlive format(SzMessages191"^4[%s] ^3%s : ^4%s"PREFIXADMINVIPSzNameSzMessages) : format(SzMessages191"^1*DEAD* ^4[%s] ^3%s : ^4%s"PREFIXADMINVIPSzNameSzMessages));
    else if(
get_pcvar_num(VIPPrefix) && !(SzGetFlag FLAGADMINVIP))(SzAlive format(SzMessages191"^3%s : ^1%s"SzNameSzMessages) : format(SzMessages191"^1*DEAD* ^3%s : ^1%s"SzNameSzMessages));
    for(new 
1<= SzMaxPlayersi++)
        {
            if(!
is_user_connected(i))
                continue;
        
            if(
SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))
                {
                    
message_begin(MSG_ONEget_user_msgid("SayText"), {000}, i);
                    
write_byte(id);
                    
write_string(SzMessages);
                    
message_end();
                }
        }

    return 
PLUGIN_CONTINUE;
}

public 
hook_say_team(id){
    new 
SzMessages[192], SzName[32];
    new 
SzAlive is_user_alive(id);
    new 
SzGetFlag get_user_flags(id);
    new 
SzGetTeam get_user_team(id);

    
read_args(SzMessages191);
    
remove_quotes(SzMessages);
    
get_user_name(idSzName31);
 
    if(!
is_valid_msg(SzMessages)) 
    return 
PLUGIN_CONTINUE;
        
    if(
get_pcvar_num(VIPPrefix) && SzGetFlag FLAGADMINVIP)(SzAlive format(SzMessages191"^1(%s) ^4[%s] ^3%s : ^4%s"SzGTeam[SzGetTeam], PREFIXADMINVIPSzNameSzMessages) : format(SzMessages191"^1*DEAD* ^1(%s) ^4[%s] ^3%s : ^4%s"SzGTeam[SzGetTeam], VIPPrefixSzNameSzMessages)); 
    else if(
get_pcvar_num(VIPPrefix) && !(SzGetFlag FLAGADMINVIP))(SzAlive format(SzMessages191"^1(%s) ^3%s : ^1%s"SzGTeam[SzGetTeam], SzNameSzMessages) : format(SzMessages191"^1*DEAD* ^1(%s) ^3%s : ^1%s"SzGTeam[SzGetTeam], SzNameSzMessages));

    for(new 
1<= SzMaxPlayersi++)
        {
            if(!
is_user_connected(i))
                continue;
            
            if(
get_user_team(i) != SzGetTeam)
                continue;
            
            if(
SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))
                {
                    
message_begin(MSG_ONEget_user_msgid("SayText"), {000}, i);
                    
write_byte(id);
                    
write_string(SzMessages);
                    
message_end();
                }
        }

    return 
PLUGIN_CONTINUE;
}

bool:is_valid_msg(const SzMessages[]){
    if( 
SzMessages[0] == '@'
    
|| !strlen(SzMessages)){ return false; }
    return 
true;
}

public 
client_putinserver(id)
{
    if(
access(id,VIP_LEVEL))
    {
        
vips[id] = true
    
}
}

public 
client_disconnect(id
{
    if( 
vips[id] )
    {
        
vips[id] = false
    
}
}

public 
resethud(id)
{
    if( 
vips[id] )
    {
        
set_user_scoreattrib(id,4)
    }
}

stock set_user_scoreattrib(id,attrib=0)
{
    
message_begin(2,get_user_msgid("ScoreAttrib"),{0,0,0},0);
    
write_byte(id);
    
write_byte(attrib);
    
message_end();
}  

stock chat(const id, const input[], any:...) { 
    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg190input3); 

    
replace_all(msg190"!g""^4"); 
    
replace_all(msg190"!n""^1"); 
    
replace_all(msg190"!t""^3"); 

    if(
idplayers[0] = id
    else 
get_players(playerscount"ch"); { 
        for(new 
0counti++) { 
            if(
is_user_connected(players[i])) { 
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]); 
                
write_byte(players[i]); 
                
write_string(msg); 
                
message_end(); 
            } 
        } 
    } 

__________________
Hosting Servers: Angel Of Games

Facebook
My YouTube
Join My Forum
Ro{Y}aL WarLanD CommuniTy
Angel Of Games - Forum
Currently Working On: ADVANCED VIP + API : 70%
DON KHAN 1 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-12-2019 , 09:16   Re: gold vip
Reply With Quote #18

I think you can use Ham_Item_deploy instead of curweapon.
__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-12-2019 , 09:21   Re: gold vip
Reply With Quote #19

Quote:
Originally Posted by iceeedr View Post
I think you can use Ham_Item_deploy instead of curweapon.
I guess ham_item_deploy is good to change 1 weapon model only , do you know an efficient way of replacing all weapon models with ham_item_deploy ?
LearninG is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-12-2019 , 10:22   Re: gold vip
Reply With Quote #20

Quote:
Originally Posted by LearninG View Post
I guess ham_item_deploy is good to change 1 weapon model only , do you know an efficient way of replacing all weapon models with ham_item_deploy ?
Didn't tested...

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <engine>

#define    SLOT_PRIMARY        1
#define    SLOT_SECONDARY        2

new WeaponSlots[] =
{
    
0,
    
2,    //CSW_P228
    
0,
    
1,    //CSW_SCOUT
    
4,    //CSW_HEGRENADE
    
1,    //CSW_XM1014
    
5,    //CSW_C4
    
1,    //CSW_MAC10
    
1,    //CSW_AUG
    
4,    //CSW_SMOKEGRENADE
    
2,    //CSW_ELITE
    
2,    //CSW_FIVESEVEN
    
1,    //CSW_UMP45
    
1,    //CSW_SG550
    
1,    //CSW_GALIL
    
1,    //CSW_FAMAS
    
2,    //CSW_USP
    
2,    //CSW_GLOCK18
    
1,    //CSW_AWP
    
1,    //CSW_MP5NAVY
    
1,    //CSW_M249
    
1,    //CSW_M3
    
1,    //CSW_M4A1
    
1,    //CSW_TMP
    
1,    //CSW_G3SG1
    
4,    //CSW_FLASHBANG
    
2,    //CSW_DEAGLE
    
1,    //CSW_SG552
    
1,    //CSW_AK47
    
3,    //CSW_KNIFE
    
1    //CSW_P90
}

new const 
WEAPONENTNAMES[][] = 
{     
"""weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
        
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
        
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
        
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
        
"weapon_ak47""weapon_knife""weapon_p90" 
}

public 
plugin_init()
{
    for (new 
1sizeof WEAPONENTNAMESi++)
        {
            if (
WEAPONENTNAMES[i][0]) RegisterHam(Ham_Item_DeployWEAPONENTNAMES[i], "OnItemDeployPost"1)
        }
}

public 
OnItemDeployPost(ent)
{
    new 
id get_pdata_cbase(ent414)

    if (!
pev_valid(id)) return

    static 
wpnName[16] , vmodel[32] , pmodel[32]
        
get_weaponname(get_user_weapon(id) , wpnName charsmax(wpnName))
        new 
iWeapon get_user_weapon(id)

        if(
WeaponSlots[iWeapon] == SLOT_PRIMARY || WeaponSlots[iWeapon] == SLOT_SECONDARY)
    {
        
copy(vmodel charsmax(vmodel) , wpnName)
            
replace_all(vmodelcharsmax(vmodel), "weapon_""")
            
copy(pmodel charsmax(pmodel) , vmodel)
            
format(vmodel charsmax(vmodel) , "models/Knife_vip/v_%s.mdl" vmodel)
            
format(pmodel charsmax(pmodel) , "models/Knife_vip/p_%s.mdl" pmodel)


            
entity_set_string(idEV_SZ_viewmodel vmodel)
            
entity_set_string(idEV_SZ_weaponmodelpmodel)
    }

__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:59.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode