This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

How to give feature out of other plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alien100
Member
Join Date: May 2010
Location: Finland
Old 06-07-2011 , 03:28   How to give feature out of other plugin
Reply With Quote #1

Hello i have my own furien server and vip plugin that i create out of others.
How can i add there so like i have plugin where is superknife and it costs 16000

There is superknife plugin:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

#include "furien.inc"
#include "furien_shop.inc"

#define VERSION "0.2.0"

#define FIRST_PLAYER_ID    1

new g_iMaxPlayers
#define IsPlayer(%1)    ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers )

#define XO_WEAPON 4
#define m_pPlayer 41

#define XO_PLAYER        5
#define m_pActiveItem    373

new g_bHasSuperKnife
#define SetUserSuperKnife(%1)        g_bHasSuperKnife |= 1<<(%1&31)
#define RemoveUserSuperKnife(%1)    g_bHasSuperKnife &= ~(1<<(%1&31))
#define HasUserSuperKnife(%1)        g_bHasSuperKnife & 1<<(%1&31)

new g_iszSuperKnifeModel
new Float:g_flSuperKnifeDamageFactor

new g_iCost[2]

public 
plugin_precache()
{
    
register_plugin("Furien SuperKnife"VERSION"ConnorMcLeod")

    new 
szConfigFile[128]
    
get_localinfo("amxx_configsdir"szConfigFilecharsmax(szConfigFile))
    
format(szConfigFilecharsmax(szConfigFile), "%s/furien/items/superknife.ini"szConfigFile);

    new 
fp fopen(szConfigFile"rt")
    if( !
fp )
    {
        return
    }

    new 
szFurienName[32], szAntiName[32]

    new 
szDatas[80], szKey[16], szValue[64]
    while( !
feof(fp) )
    {
        
fgets(fpszDatascharsmax(szDatas))
        
trim(szDatas)
        if(!
szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
        {
            continue
        }

        
parse(szDatasszKeycharsmax(szKey), szValuecharsmax(szValue))

        switch( 
szKey[0] )
        {
            case 
'A':
            {
                switch( 
szKey[7] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"ANTI_NAME" ) )
                        {
                            
copy(szAntiNamecharsmax(szAntiName), szValue)
                        }
                    }
                    case 
'S':
                    {
                        if( 
equal(szKey"ANTI_COST" ) )
                        {
                            
g_iCost[AntiFurien] = str_to_num(szValue)
                        }
                    }
                }
            }
            case 
'F':
            {
                switch( 
szKey[9] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"FURIEN_NAME" ) )
                        {
                            
copy(szFurienNamecharsmax(szAntiName), szValue)
                        }
                    }
                    case 
'S':
                    {
                        if( 
equal(szKey"FURIEN_COST" ) )
                        {
                            
g_iCost[Furien] = str_to_num(szValue)
                        }
                    }
                }
            }
            case 
'K':
            {
                switch( 
szKey[6] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"KNIFE_MODEL" ) )
                        {
                            
precache_model(szValue)
                            
g_iszSuperKnifeModel engfunc(EngFunc_AllocStringszValue)
                        }
                    }
                    case 
'D':
                    {
                        if( 
equal(szKey"KNIFE_DAMAGE" ) )
                        {
                            
g_flSuperKnifeDamageFactor str_to_float(szValue)
                        }
                    }
                }
            }
        }
    }
    
fclosefp )

    if( 
g_iCost[Furien] || g_iCost[AntiFurien] )
    {
        
furien_register_item(szFurienNameg_iCost[Furien], szAntiNameg_iCost[AntiFurien], "furien_buy_superknife")    

        
RegisterHam(Ham_Killed"player""Ham_CBasePlayer_Killed_Post"true)
        
RegisterHam(Ham_TakeDamage"player""CBasePlayer_TakeDamage"false)
        
RegisterHam(Ham_Item_Deploy"weapon_knife""CKnife_Deploy"true)

        
g_iMaxPlayers get_maxplayers()
    }
}

public 
client_putinserver(id)
{
    
RemoveUserSuperKnife(id)
}

public 
furien_buy_superknifeid )
{
    new 
iTeam furien_get_user_team(id)
    if( 
iTeam == -)
    {
        return 
ShopCloseMenu
    
}

    new 
iItemCost g_iCost[iTeam]
    if( 
iItemCost <= )
    {
        return 
ShopTeamNotAvail
    
}

    if( ~
HasUserSuperKnife(id) )
    {
        if( 
furien_try_buy(idiItemCost) )
        {
            
SetUserSuperKnife(id)
            if( 
get_user_weapon(id) == CSW_KNIFE )
            {
                
ExecuteHamB(Ham_Item_Deployget_pdata_cbase(idm_pActiveItemXO_PLAYER))
            }
            return 
ShopBought
        
}
        else
        {
            return 
ShopNotEnoughMoney
        
}
    }
    return 
ShopAlreadyHaveOne
}

public 
CKnife_DeployiKnife )
{
    new 
id get_pdata_cbase(iKnifem_pPlayerXO_WEAPON)

    if( 
HasUserSuperKnife(id) )
    {
        
set_pev(idpev_viewmodelg_iszSuperKnifeModel)
    }
}

public 
CBasePlayer_TakeDamage(idiInflictoriAttackerFloat:flDamagebitsDamageType)
{
    if( 
IsPlayer(iInflictor) && HasUserSuperKnife(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE )
    {
        
SetHamParamFloat4flDamage g_flSuperKnifeDamageFactor )
    }
}

public 
Ham_CBasePlayer_Killed_Post(id)
{
    
RemoveUserSuperKnife(id)
}

public 
furien_team_change/*iFurien */ )
{
    if( !
g_iCost[Furien] || !g_iCost[AntiFurien] )
    {
        new 
iPlayers[32], iNumid
        get_players
(iPlayersiNum"a")
        for(new 
ii<iNumi++)
        {
            
id iPlayers[i]
            if( 
HasUserSuperKnife(id) )
            {
                
RemoveUserSuperKnife(id)
                if( 
get_user_weapon(id) == CSW_KNIFE )
                {
                    
ExecuteHamB(Ham_Item_Deployget_pdata_cbase(idm_pActiveItemXO_PLAYER))
                }
            }
        }
        
g_bHasSuperKnife 0
    
}
}

public 
furien_round_restart()
{
    
g_bHasSuperKnife 0

I need to get free superknife for vips every 5 rounds and then it dissapheres even if i am alive.

Here is my VIP plugin:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""

new maxplayers
new g_MsgSync
new mpdmkbmhb
new gmsgSayText
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
new health_add
new health_hs_add

#define DAMAGE_RECIEVED
#define PLUGIN "Furien VIP"
#define VERSION "1.0"
#define AUTHOR "sMog"

#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
mpd register_cvar("money_per_damage","1")
    
mkb register_cvar("money_kill_bonus","100")
    
mhb register_cvar("money_hs_bonus","200")
    
health_add register_cvar("amx_vip_hp""10")
    
health_max register_cvar("amx_vip_max_hp""200")
    
health_hs_add register_cvar("amx_vip_hp_hs""15")
    
maxplayers get_maxplayers()
    
RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawnPost"1); 
    
register_event("DeathMsg""hook_death""a""1>0")
    
register_event("Damage""on_damage""b""2!0""3=0""4!0")
    
register_event("Damage","Damage","b")
    
register_event("DeathMsg","death_msg","a")
    
register_clcmd("say""handle_say")
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
    
g_MsgSync CreateHudSyncObj()
    
gmsgSayText get_user_msgid("SayText")
#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif
}

public 
FwdHamPlayerSpawnPost(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H && is_user_alive(id))
    {
        
set_user_healthidget_user_health(id) + 15);
        
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
           
fm_give_item(id"item_assaultsuit");
           
fm_give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE2)
        
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_SMOKEGRENADE2)
           
            }
            
            case 
CS_TEAM_CT:
            {
           
fm_give_item(id"item_thighpack");
           
fm_give_item(id"item_assaultsuit");
           
give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE1)
        
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
                   
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
           
           
fm_give_item(id"weapon_elite")
           
cs_set_user_bpammo(idCSW_ELITE100)
            }
        }
    }
}

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 
hook_death()
{
   
// Killer id
   
nKiller read_data(1)
   
   if ( (
read_data(3) == 1) && (read_data(5) == 0) )
   {
      
nHp_add get_pcvar_num (health_hs_add)
   }
   else
      
nHp_add get_pcvar_num (health_add)
   
nHp_max get_pcvar_num (health_max)
   
// Updating Killer HP
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   
nKiller_hp get_user_health(nKiller)
   
nKiller_hp += nHp_add
   
// Maximum HP check
   
if (nKiller_hp nHp_maxnKiller_hp nHp_max
   set_user_health
(nKillernKiller_hp)
   
// Hud message "Healed +15/+30 hp"
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
   
show_hudmessage(nKiller"Healed +%d hp"nHp_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 
client_authorized(id)
{
 
set_task(30.0"PrintText" ,id)
}
public 
PrintText(id)
{
 
client_print(idprint_chat"[VIP] write /vip and u will see how get VIP and VIP privilegies.")


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 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIP online.")
        
print_message(usermessage)
    }
    
    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

Hopw this is not big reguest
__________________
alien100 is offline
Send a message via MSN to alien100 Send a message via Skype™ to alien100
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-07-2011 , 03:49   Re: How to give feature out of other plugin
Reply With Quote #2

Quote:
Originally Posted by alien100 View Post
Hello i have my own furien server and vip plugin that i create out of others.
How can i add there so like i have plugin where is superknife and it costs 16000

There is superknife plugin:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
 
#include "furien.inc"
#include "furien_shop.inc"
 
#define VERSION "0.2.0"
 
#define FIRST_PLAYER_ID    1
 
new g_iMaxPlayers
#define IsPlayer(%1)    ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers )
 
#define XO_WEAPON 4
#define m_pPlayer 41
 
#define XO_PLAYER        5
#define m_pActiveItem    373
 
new g_bHasSuperKnife
#define SetUserSuperKnife(%1)        g_bHasSuperKnife |= 1<<(%1&31)
#define RemoveUserSuperKnife(%1)    g_bHasSuperKnife &= ~(1<<(%1&31))
#define HasUserSuperKnife(%1)        g_bHasSuperKnife & 1<<(%1&31)
 
new g_iszSuperKnifeModel
new Float:g_flSuperKnifeDamageFactor
 
new g_iCost[2]
 
public 
plugin_precache()
{
    
register_plugin("Furien SuperKnife"VERSION"ConnorMcLeod")
 
    new 
szConfigFile[128]
    
get_localinfo("amxx_configsdir"szConfigFilecharsmax(szConfigFile))
    
format(szConfigFilecharsmax(szConfigFile), "%s/furien/items/superknife.ini"szConfigFile);
 
    new 
fp fopen(szConfigFile"rt")
    if( !
fp )
    {
        return
    }
 
    new 
szFurienName[32], szAntiName[32]
 
    new 
szDatas[80], szKey[16], szValue[64]
    while( !
feof(fp) )
    {
        
fgets(fpszDatascharsmax(szDatas))
        
trim(szDatas)
        if(!
szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
        {
            continue
        }
 
        
parse(szDatasszKeycharsmax(szKey), szValuecharsmax(szValue))
 
        switch( 
szKey[0] )
        {
            case 
'A':
            {
                switch( 
szKey[7] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"ANTI_NAME" ) )
                        {
                            
copy(szAntiNamecharsmax(szAntiName), szValue)
                        }
                    }
                    case 
'S':
                    {
                        if( 
equal(szKey"ANTI_COST" ) )
                        {
                            
g_iCost[AntiFurien] = str_to_num(szValue)
                        }
                    }
                }
            }
            case 
'F':
            {
                switch( 
szKey[9] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"FURIEN_NAME" ) )
                        {
                            
copy(szFurienNamecharsmax(szAntiName), szValue)
                        }
                    }
                    case 
'S':
                    {
                        if( 
equal(szKey"FURIEN_COST" ) )
                        {
                            
g_iCost[Furien] = str_to_num(szValue)
                        }
                    }
                }
            }
            case 
'K':
            {
                switch( 
szKey[6] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"KNIFE_MODEL" ) )
                        {
                            
precache_model(szValue)
                            
g_iszSuperKnifeModel engfunc(EngFunc_AllocStringszValue)
                        }
                    }
                    case 
'D':
                    {
                        if( 
equal(szKey"KNIFE_DAMAGE" ) )
                        {
                            
g_flSuperKnifeDamageFactor str_to_float(szValue)
                        }
                    }
                }
            }
        }
    }
    
fclosefp )
 
    if( 
g_iCost[Furien] || g_iCost[AntiFurien] )
    {
        
furien_register_item(szFurienNameg_iCost[Furien], szAntiNameg_iCost[AntiFurien], "furien_buy_superknife")    
 
        
RegisterHam(Ham_Killed"player""Ham_CBasePlayer_Killed_Post"true)
        
RegisterHam(Ham_TakeDamage"player""CBasePlayer_TakeDamage"false)
        
RegisterHam(Ham_Item_Deploy"weapon_knife""CKnife_Deploy"true)
 
        
g_iMaxPlayers get_maxplayers()
    }
}
 
public 
client_putinserver(id)
{
    
RemoveUserSuperKnife(id)
}
 
public 
furien_buy_superknifeid )
{
    new 
iTeam furien_get_user_team(id)
    if( 
iTeam == -)
    {
        return 
ShopCloseMenu
    
}
 
    new 
iItemCost g_iCost[iTeam]
    if( 
iItemCost <= )
    {
        return 
ShopTeamNotAvail
    
}
 
    if( ~
HasUserSuperKnife(id) )
    {
        if( 
furien_try_buy(idiItemCost) )
        {
            
SetUserSuperKnife(id)
            if( 
get_user_weapon(id) == CSW_KNIFE )
            {
                
ExecuteHamB(Ham_Item_Deployget_pdata_cbase(idm_pActiveItemXO_PLAYER))
            }
            return 
ShopBought
        
}
        else
        {
            return 
ShopNotEnoughMoney
        
}
    }
    return 
ShopAlreadyHaveOne
}
 
public 
CKnife_DeployiKnife )
{
    new 
id get_pdata_cbase(iKnifem_pPlayerXO_WEAPON)
 
    if( 
HasUserSuperKnife(id) )
    {
        
set_pev(idpev_viewmodelg_iszSuperKnifeModel)
    }
}
 
public 
CBasePlayer_TakeDamage(idiInflictoriAttackerFloat:flDamagebitsDamageType)
{
    if( 
IsPlayer(iInflictor) && HasUserSuperKnife(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE )
    {
        
SetHamParamFloat4flDamage g_flSuperKnifeDamageFactor )
    }
}
 
public 
Ham_CBasePlayer_Killed_Post(id)
{
    
RemoveUserSuperKnife(id)
}
 
public 
furien_team_change/*iFurien */ )
{
    if( !
g_iCost[Furien] || !g_iCost[AntiFurien] )
    {
        new 
iPlayers[32], iNumid
        get_players
(iPlayersiNum"a")
        for(new 
ii<iNumi++)
        {
            
id iPlayers[i]
            if( 
HasUserSuperKnife(id) )
            {
                
RemoveUserSuperKnife(id)
                if( 
get_user_weapon(id) == CSW_KNIFE )
                {
                    
ExecuteHamB(Ham_Item_Deployget_pdata_cbase(idm_pActiveItemXO_PLAYER))
                }
            }
        }
        
g_bHasSuperKnife 0
    
}
}
 
public 
furien_round_restart()
{
    
g_bHasSuperKnife 0

I need to get free superknife for vips every 5 rounds and then it dissapheres even if i am alive.

Here is my VIP plugin:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
 
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
 
new maxplayers
new g_MsgSync
new mpdmkbmhb
new gmsgSayText
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
new health_add
new health_hs_add
 
#define DAMAGE_RECIEVED
#define PLUGIN "Furien VIP"
#define VERSION "1.0"
#define AUTHOR "sMog"
 
#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
mpd register_cvar("money_per_damage","1")
    
mkb register_cvar("money_kill_bonus","100")
    
mhb register_cvar("money_hs_bonus","200")
    
health_add register_cvar("amx_vip_hp""10")
    
health_max register_cvar("amx_vip_max_hp""200")
    
health_hs_add register_cvar("amx_vip_hp_hs""15")
    
maxplayers get_maxplayers()
    
RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawnPost"1); 
    
register_event("DeathMsg""hook_death""a""1>0")
    
register_event("Damage""on_damage""b""2!0""3=0""4!0")
    
register_event("Damage","Damage","b")
    
register_event("DeathMsg","death_msg","a")
    
register_clcmd("say""handle_say")
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
    
g_MsgSync CreateHudSyncObj()
    
gmsgSayText get_user_msgid("SayText")
#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif
}
 
public 
FwdHamPlayerSpawnPost(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H && is_user_alive(id))
    {
        
set_user_healthidget_user_health(id) + 15);
 
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
           
fm_give_item(id"item_assaultsuit");
           
fm_give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE2)
 
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
 
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_SMOKEGRENADE2)
 
            }
 
            case 
CS_TEAM_CT:
            {
           
fm_give_item(id"item_thighpack");
           
fm_give_item(id"item_assaultsuit");
           
give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE1)
 
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
 
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
 
           
fm_give_item(id"weapon_elite")
           
cs_set_user_bpammo(idCSW_ELITE100)
            }
        }
    }
}
 
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 
hook_death()
{
   
// Killer id
   
nKiller read_data(1)
 
   if ( (
read_data(3) == 1) && (read_data(5) == 0) )
   {
      
nHp_add get_pcvar_num (health_hs_add)
   }
   else
      
nHp_add get_pcvar_num (health_add)
   
nHp_max get_pcvar_num (health_max)
   
// Updating Killer HP
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;
 
   
nKiller_hp get_user_health(nKiller)
   
nKiller_hp += nHp_add
   
// Maximum HP check
   
if (nKiller_hp nHp_maxnKiller_hp nHp_max
   set_user_health
(nKillernKiller_hp)
   
// Hud message "Healed +15/+30 hp"
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
   
show_hudmessage(nKiller"Healed +%d hp"nHp_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 
client_authorized(id)
{
 
set_task(30.0"PrintText" ,id)
}
public 
PrintText(id)
{
 
client_print(idprint_chat"[VIP] write /vip and u will see how get VIP and VIP privilegies.")

 
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 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIP online.")
        
print_message(usermessage)
    }
 
    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}
 
print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

Hopw this is not big reguest
i think u must make a bool
PHP Code:
new bool:g_hassuperknife 
2reason2kill is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-07-2011 , 05:38   Re: How to give feature out of other plugin
Reply With Quote #3

wrong forum, requests go in here: http://forums.alliedmods.net/forumdisplay.php?f=12
jimaway is offline
alien100
Member
Join Date: May 2010
Location: Finland
Old 06-07-2011 , 18:25   Re: How to give feature out of other plugin
Reply With Quote #4

i am noob scripter :S how to makebool ?
__________________
alien100 is offline
Send a message via MSN to alien100 Send a message via Skype™ to alien100
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-07-2011 , 19:11   Re: How to give feature out of other plugin
Reply With Quote #5

Quote:
Originally Posted by 2reason2kill View Post
PHP Code:
new bool:g_hassuperknife 
jimaway is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-07-2011 , 19:15   Re: How to give feature out of other plugin
Reply With Quote #6

Quote:
Originally Posted by 2reason2kill View Post
i think u must make a bool
PHP Code:
new bool:g_hassuperknife 
Wrong. I'm quite sure you don't understand his request.
__________________
fysiks is offline
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-10-2011 , 03:55   Re: How to give feature out of other plugin
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
Wrong. I'm quite sure you don't understand his request.
i miss read it -.-'
2reason2kill 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 13:04.


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