Raised This Month: $ Target: $400
 0% 

Help DreadNova Bug Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxScripteRxX
Member
Join Date: Aug 2019
Old 06-27-2020 , 18:35   Re: Help DreadNova Bug Fix
Reply With Quote #1

PHP Code:
[CODE]/ Gun Xp Mod Include File //
#if defined _gunxpmod_included
  #endinput
#endif
#define _gunxpmod_included

#if !defined charsmax
    #define charsmax(%1) sizeof(%1)-1
#endif 

//Unlocks levels defined
#define GUN_SECTION_KNIFE 1
#define GUN_SECTION_PISTOL 2
#define GUN_SECTION_RIFLE 3
#define GUN_SECTION_GRENADES 4
#define GUN_SECTION_ITEMS 5
 
//Access unlocks
#define GUN_FIRST_ACCESS_ID 1
#define GUN_FIRST_ACCESS ADMIN_LEVEL_H
#define GUN_FIRST_ACCESS_TEXT "Require VIP access"

#define GUN_SECOND_ACCESS_ID 2
#define GUN_SECOND_ACCESS ADMIN_BAN
#define GUN_SECOND_ACCESS_TEXT "Require ADMIN access"

#define GUN_THIRD_ACCESS_ID 3
#define GUN_THIRD_ACCESS ADMIN_IMMUNITY
#define GUN_THIRD_ACCESS_TEXT "Require SUPER-ADMIN access"


//Class PIRCES
#define CLASS_PRICE_XP 1
#define CLASS_PRICE_PR 2

//Unlocks CSW
#define CSW_SANDBAGS 33

//POWERS******
native load_powers();

native get_bonus_xp(id); //Get bonus XP
native get_k1asus(id); //Get k1asus count
native get_supp_box(id); //Get supply box XP from
native get_forcefield_time(id); //Get force field additional time
native get_pipe_radius(id); //Get percent of additional radius
//************

//get if loaded levels
native gxm_level_loaded(id);

//save user level/xp/prestige
native gxm_save_level(id);

//get user save type
native get_user_save_type(id);

// Returns player Experience.
native get_user_xp(id)

// Sets player Experience.
native set_user_xp(idamount)

// Returns player Prestige.
native get_user_prestige(id)

// Sets player Prestige.
native set_user_prestige(idamount)

// Returns player Level.
native get_user_level(id)

// Sets player Level.
native set_user_level(idamount)

// Returns player Level by Xp.
native get_user_max_level(id)

// Register Item.
stock find_itemplugin()
{
    for(new 
0get_pluginsnum(); ++i)
    {
        new 
temp[2], name[64]
        
get_plugin(iname63temp1temp1temp1temp1)
         if(
equali(name"gunxpmod_shop.amxx")) {
             return 
i;
        }
    }
     return -
1;
}

stock find_itemindex()
{
    new 
temp[2], name[64], pluginname[64]
    
get_plugin(-1pluginname63temp1temp1temp1temp1)
    for (new 
0get_pluginsnum(); ++i)
    {
        
get_plugin(iname63temp1temp1temp1temp1)
         if(
equal(namepluginname))
        {
             return 
i
        
}
    }
     return -
1
}

native register_gxm_item(item_name[], item_desc[], item_costitem_levelitem_sectionitem_accessweapon)
native register_item_gxm(item_name[], item_desc[], item_costitem_levelitem_sectionitem_accessweapon)

// Register Skills.
stock find_skillplugin()
{
    for(new 
0get_pluginsnum(); ++i)
    {
        new 
temp[2], name[64]; get_plugin(iname63temp1temp1temp1temp1);
         if(
equali(name"gunxpmod_powers.amxx")) { return i; }
    }
     return -
1;
}

stock find_skillindex()
{
    new 
temp[2], name[64], pluginname[64];
    
get_plugin(-1pluginname63temp1temp1temp1temp1);
    for (new 
0get_pluginsnum(); ++i) {
        
get_plugin(iname63temp1temp1temp1temp1);
         if(
equal(namepluginname)) { return i; }
    }
     return -
1
}

stock register_gxm_apwr(skill_name[], skill_desc[], skill_costskill_levelskill_access)
{
    new 
skill_index find_skillindex(), skillplugin find_skillplugin();
    new 
itemregfunc get_func_id("register_apwr_gxm"skillplugin);

    new 
temp callfunc_begin_i(itemregfuncskillplugin);
    if(
temp == -|| temp == -2)
    {
        if(
temp == -2) { log_amx("You have to many skill and need to increase the MAX_SKILLS define!"); }
        else { 
log_amx("A unkown error has happend, make sure the Skills plugin is loaded!"); }
        
        return 
PLUGIN_HANDLED;
    }

    
callfunc_push_int(skill_index);
    
callfunc_push_str(skill_name);
    
callfunc_push_str(skill_desc);
    
callfunc_push_int(skill_cost);
    
callfunc_push_int(skill_level);
    
callfunc_push_int(skill_access);
    
    
temp callfunc_end();
    if(
temp == -|| temp == -2) { return PLUGIN_HANDLED; }
    
    return 
temp;
}[/
CODE
XxScripteRxX is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 06-29-2020 , 22:59   Re: Help DreadNova Bug Fix
Reply With Quote #2

Sorry for being late, the code it's a little ...... idk how to tell you exactly, not really good
you or the creator of the code had to make a team menu, 1 menu for team human, 1 for zombie so you can simply avoid it to be can from shop and... also in dreadnova sma
PHP Code:
public _give_user_dreadnova(iPlayer)
{
    
set_bit(gl_iBitUserHasDreadNovaiPlayer);
    
UTIL_WeaponList(iPlayerWEAPON_WEAPONLIST15100, -1, -121290);

    new 
iItem get_pdata_cbase(iPlayerm_pActiveItemlinux_diff_player);
    if(
pev_valid(iItem) == PDATA_SAFE)
    {
        
set_pev(iItempev_iEnergy0);

        if(
is_user_alive(iPlayer) && IsCustomItem(iItem))
            
ExecuteHamB(Ham_Item_DeployiItem);
    }
}
TO THIS \/
public 
_give_user_dreadnova(iPlayer)
{
        if(
zp_get_user_zombie(iPlayer)
        return

    
set_bit(gl_iBitUserHasDreadNovaiPlayer);
    
UTIL_WeaponList(iPlayerWEAPON_WEAPONLIST15100, -1, -121290);

    new 
iItem get_pdata_cbase(iPlayerm_pActiveItemlinux_diff_player);
    if(
pev_valid(iItem) == PDATA_SAFE)
    {
        
set_pev(iItempev_iEnergy0);

        if(
is_user_alive(iPlayer) && IsCustomItem(iItem))
            
ExecuteHamB(Ham_Item_DeployiItem);
    }

AnimalMonster is offline
Reply



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 17:14.


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