HNS XP Double xp for vip

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
Ofaz
Jau po truputį tampa savu
Posts: 125
Joined: 2013 Apr 27 15:03
Skype: srydomis
Location: Ignalina

HNS XP Double xp for vip

Post by Ofaz »

sveiki, gal galit kas nors padaryt ar duot hns xp plugin, kur duoda dvigubai daugiau xp vipams?
Pain is just WEAKNESS leaving YOUR body.

User avatar
NZT
Flooderis arba specialistas
Posts: 836
Joined: 2011 Aug 18 17:44

Re: HNS XP Double xp for vip

Post by NZT »

Sveikas, pabandyk šį pluginą:

Code: Select all

#include <amxmisc> // We only need amxmisc for this..  #pragma semicolon 1 // Why not  native is_user_vip(id); // Get the Vip-Manager check. native hnsxp_get_user_xp(id); // Get the HnsXP-xp. native hnsxp_set_user_xp(id, xp); // Set the Hns-xp.  new pcvar_xp; // Pcvar  public plugin_init() {     register_plugin("XP-Boost (VIP)", "1.0.0", "Ex1ne"); // Registering plugin (Optinal)     register_event("DeathMsg", "eDeath", "a"); // Register the deathmsg event to catch a kill.     pcvar_xp = register_cvar("xpb_vip", "50"); // Pcvar for the xp-boost }  public cDeath() {     if(read_data(1) /*Killer*/ == read_data(2) /*Victim*/) // To check if it was a suicide.     {         return PLUGIN_HANDLED;     }     if(is_user_vip(read_data(1) /*Killer*/)) // Check if the killer is VIP.     {         hnsxp_set_user_xp(read_data(1), hnsxp_get_user_xp(read_data(1)) + get_pcvar_num(pcvar_xp)); // Add the xp         return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED; }
arba dar yra toks HNS VIP pluginas: https://forums.alliedmods.net/showthread.php?t=152391

User avatar
Ofaz
Jau po truputį tampa savu
Posts: 125
Joined: 2013 Apr 27 15:03
Skype: srydomis
Location: Ignalina

Re: HNS XP Double xp for vip

Post by Ofaz »

NZT wrote:Sveikas, pabandyk šį pluginą:

Code: Select all

#include <amxmisc> // We only need amxmisc for this..  #pragma semicolon 1 // Why not  native is_user_vip(id); // Get the Vip-Manager check. native hnsxp_get_user_xp(id); // Get the HnsXP-xp. native hnsxp_set_user_xp(id, xp); // Set the Hns-xp.  new pcvar_xp; // Pcvar  public plugin_init() {     register_plugin("XP-Boost (VIP)", "1.0.0", "Ex1ne"); // Registering plugin (Optinal)     register_event("DeathMsg", "eDeath", "a"); // Register the deathmsg event to catch a kill.     pcvar_xp = register_cvar("xpb_vip", "50"); // Pcvar for the xp-boost }  public cDeath() {     if(read_data(1) /*Killer*/ == read_data(2) /*Victim*/) // To check if it was a suicide.     {         return PLUGIN_HANDLED;     }     if(is_user_vip(read_data(1) /*Killer*/)) // Check if the killer is VIP.     {         hnsxp_set_user_xp(read_data(1), hnsxp_get_user_xp(read_data(1)) + get_pcvar_num(pcvar_xp)); // Add the xp         return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED; }
arba dar yra toks HNS VIP pluginas: https://forums.alliedmods.net/showthread.php?t=152391
dėkui!
Pain is just WEAKNESS leaving YOUR body.

InvIs2
Jau po truputį tampa savu
Posts: 149
Joined: 2013 Sep 29 12:47
Skype: pksoldierlt

Re: HNS XP Double xp for vip

Post by InvIs2 »

is_user_vip(read_data(1) ?

luxuks
Jau po truputį tampa savu
Posts: 186
Joined: 2014 Jun 18 17:20
Skype: lukas.luxuks

Re: HNS XP Double xp for vip

Post by luxuks »

Ar galite kas paaiskint kaip isirasyti sita dalyka be vip manager? noriu kad pluginas veiktu zmonem su flagu ADMIN_LEVEL_H cia juk tereikia pakeist eilute get_user_flags ar kaska panasaus, siuose dalykuose as nesigaudau tai gal kas padetumete?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests