Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uyarlama Eklenti
#1
ben bu eklentiyi kaç gündür arıyordum sonunda buldum fakat istediğim moda yani bb moduna çeviremiyorum bazı kodlardan dolayı hata alıyorum..

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <zombieplague>
#include <hamsandwich>


#define OFFSET_FLASH_AMMO 387
#define OFFSET_HE_AMMO 388
#define OFFSET_SMOKE_AMMO 389


new const item_class_name[] = "dm_item"


new g_models[][] = {"models/zombie_plague/presents.mdl"}


public plugin_precache()
{
    for (new i = 0; i < sizeof g_models; i++)
        precache_model(g_models)    
}


public plugin_init()
{
    
    register_forward(FM_Touch, "fwd_Touch")
    
    register_event("HLTV", "round_start", "a", "1=0", "2=0")
    
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
    
    register_dictionary("bb.txt")
}


public fwd_Touch(toucher, touched)
{
    if (!is_user_alive(toucher) || !pev_valid(touched))
        return FMRES_IGNORED
    
    new classname[32]    
    pev(touched, pev_classname, classname, 31)
    if (!equal(classname, item_class_name))
        return FMRES_IGNORED
    
    
    
    give_item(toucher)
    set_pev(touched, pev_effects, EF_NODRAW)
    set_pev(touched, pev_solid, SOLID_NOT)
    
    return FMRES_IGNORED
    
}


public fw_PlayerKilled(victim, attacker, shouldgib)
{
    if (!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
        return HAM_IGNORED
    
    
    new random = random_num(0, 8)
    
    if (random == 1 || random == 4 || random == 6)
    {
        new origin[3]
        get_user_origin(victim, origin, 0)
        
        addItem(origin)
    }
    
    return HAM_IGNORED
}


public removeEntity(ent)
{
    if (pev_valid(ent))
        engfunc(EngFunc_RemoveEntity, ent)
}


public addItem(origin[3])
{
    new ent = fm_create_entity("info_target")
    set_pev(ent, pev_classname, item_class_name)
    
    engfunc(EngFunc_SetModel,ent, g_models[random_num(0, sizeof g_models - 1)])


    set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
    set_pev(ent,pev_maxs,Float:{10.0,10.0,25.0})
    set_pev(ent,pev_size,Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
    engfunc(EngFunc_SetSize,ent,Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})


    set_pev(ent,pev_solid,SOLID_BBOX)
    set_pev(ent,pev_movetype,MOVETYPE_FLY)
    
    new Float:fOrigin[3]
    IVecFVec(origin, fOrigin)
    set_pev(ent, pev_origin, fOrigin)
    
    set_pev(ent,pev_renderfx,kRenderFxGlowShell)
    switch(random_num(1,4))
    {
        case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})
        case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})
        case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})
        case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
    }
}


public give_item(id)
{
    new zombie
    zombie = zp_get_user_zombie(id)
    
    new i = random_num(0, (zombie ? 5 : 13))
    switch (i)
    {
        case 0:
            if (zombie)
            {
                if (!zp_get_user_last_zombie(id) && !zp_is_survivor_round() && !zp_is_swarm_round())
                {
                    zp_disinfect_user(id)
                    ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_ANTIDOT")
                }
                else
                    ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")    
            }
            else
            {
                if (!zp_get_user_last_human(id) && !zp_is_survivor_round() && !zp_is_swarm_round())
                {
                    zp_infect_user(id)
                    ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_INFECT")
                }
                else
                    ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")
            }
            
        case 1:
        {
            fm_set_user_health(id, get_user_health(id) + (zombie ? 500 : 50))
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_HEALTH_UP")
        }
        case 2:
        {
            fm_set_user_health(id, get_user_health(id) - (zombie ? 250 : 25))
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_HEALTH_DOWN")
        }
        case 3:
        {
            zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + random_num(1, 5))
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_AMMOPACKS_UP")
        }
        case 4:
        {
            zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) - random_num(1, 5))
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_AMMOPACKS_DOWN")
        }
        case 5:
        {
            fm_set_user_gravity(id, 0.5)
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_GRAVITY")
        }
        case 6:
        {
            if (!zp_get_user_nightvision(id))
            {
                zp_set_user_nightvision(id, 1)
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NIGHTVISION")
            }
            else
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")
        }
        case 7:
        {
            fm_set_user_armor(id, get_user_armor(id) + 100)
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_ARMOR_UP")
        }
        case 8:
        {
            fm_set_user_armor(id, get_user_armor(id) - 100)
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_ARMOR_DOWN")
        }
        case 9:
        {
            set_pev(id, pev_effects, pev(id, pev_effects) | EF_BRIGHTLIGHT)
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_BRIGHTLIGHT")
        }
        case 10:
        {
            fm_give_item(id, "weapon_flashbang")
            fm_give_item(id, "weapon_smokegrenade")
            fm_give_item(id, "weapon_hegrenade")
            
            set_pdata_int(id, OFFSET_FLASH_AMMO, 3)
            set_pdata_int(id, OFFSET_HE_AMMO, 3)
            set_pdata_int(id, OFFSET_SMOKE_AMMO, 3)
            
            ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_GRENADES")
        }
        case 11:
        {
            if (!user_has_weapon(id, CSW_SG550))
            {
                fm_give_item(id, "weapon_sg550")
                ExecuteHamB(Ham_GiveAmmo, id, 30, "556nato", 90)
                
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_SG550")
            }
            else
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")
        }
        case 12:
        {
            if (!user_has_weapon(id, CSW_G3SG1))
            {
                fm_give_item(id, "weapon_g3sg1")
                ExecuteHamB(Ham_GiveAmmo, id, 30, "762nato", 20)
                
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_G3SG1")
            }
            else
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")
        }
        case 13:
        {
            if (!user_has_weapon(id, CSW_M249))
            {
                fm_give_item(id, "weapon_m249")
                ExecuteHamB(Ham_GiveAmmo, id, 100, "9mm", 200)
                
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_M249")
            }
            else
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")
        }
        case 14:
        {
            if (!user_has_weapon(id, CSW_AWP))
            {
                fm_give_item(id, "weapon_awp")
                ExecuteHamB(Ham_GiveAmmo, id, 10, "338magnum", 30)
                
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_AWP")
            }
            else
                ChatColor(id, "!g!y %L", LANG_PLAYER, "ITEM_DM_NO")
        }
    }
}


public round_start()
{
    new ent = FM_NULLENT
    static string_class[] = "classname"
    while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name)))
        set_pev(ent, pev_flags, FL_KILLME)
}


// Stock: ChatColor!
stock ChatColor(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4") // Green Color
    replace_all(msg, 190, "!y", "^1") // Default Color
    replace_all(msg, 190, "!team", "^3") // Team Color
    replace_all(msg, 190, "!team2", "^0") // Team2 Color
    
    if (id) players[0] = id; else get_players(players, count, "ch")
    {
        for (new i = 0; i < count; i++)
        {
            if (is_user_connected(players))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
                write_byte(players);
                write_string(msg);
                message_end();
            }
        }
    }
}
Tabutlara sığmayacak kadar intihar var, şeytanın siparişi
dünyanın ninnisi olmuş sirenler, ya RAB bizi özler
Şah damarım attıkça yaşını silerim çeşmin, solar hayat resmin
umut nerdesin,yine bittin nerelere gittin ben seni göremeden?

Sagopa Kajmer


Plugin Hakkında Herkeze Yardımcı Olabilirim.

Skype : [email protected]
Reply
#2
Uzaklarda aramana gerek yoktu sitede bu eklenti mevcut zaten Smile

https://www.csplague.com/zp-cs-1-6-zombi...ugini.html

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <basebuilder>

#define PLUGIN "[ZP] Addon: Bonus Box"
#define VERSION "1.0"
#define AUTHOR "PomanoB & Accelerator"

#define OFFSET_FLASH_AMMO 387
#define OFFSET_HE_AMMO 388
#define OFFSET_SMOKE_AMMO 389

new const item_class_name[] = "dm_item"
new g_models[][] = {"models/zombie_plague/presents.mdl"}

public 
plugin_precache() {
    for (new 
0sizeof g_modelsi++)
        
precache_model(g_models[i])    
}
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_Touch"fwd_Touch")
    
    
register_event("HLTV""round_start""a""1=0""2=0")
    
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
    
    
register_dictionary("bb.txt")
}
public 
fwd_Touch(touchertouched) {
    if (!
is_user_alive(toucher) || !pev_valid(touched))
        return 
FMRES_IGNORED
    
    
new classname[32]    
    
pev(touchedpev_classnameclassname31)
    if (!
equal(classnameitem_class_name))
        return 
FMRES_IGNORED
    
    
    
    fm_give_items
(toucher)
    
set_pev(touchedpev_effectsEF_NODRAW)
    
set_pev(touchedpev_solidSOLID_NOT)
    
    return 
FMRES_IGNORED
    
}
public 
fw_PlayerKilled(victimattackershouldgib) {
    if (!
is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
        return 
HAM_IGNORED
    
    
    
new random random_num(08)
    
    if (
random == || random == || random == 6) {
        new 
origin[3]
        
get_user_origin(victimorigin0)
        
        
addItem(origin)
    }
    
    return 
HAM_IGNORED
}
public 
removeEntity(ent) {
    if (
pev_valid(ent))
        
engfunc(EngFunc_RemoveEntityent)
}
public 
addItem(origin[3]) {
    new 
ent fm_create_entity("info_target")
    
set_pev(entpev_classnameitem_class_name)
    
    
engfunc(EngFunc_SetModel,entg_models[random_num(0sizeof g_models 1)])
    
    
    
set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
    
set_pev(ent,pev_maxs,Float:{10.0,10.0,25.0})
    
set_pev(ent,pev_size,Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
    
engfunc(EngFunc_SetSize,ent,Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})
    
    
    
set_pev(ent,pev_solid,SOLID_BBOX)
    
set_pev(ent,pev_movetype,MOVETYPE_FLY)
    
    new 
Float:fOrigin[3]
    
IVecFVec(originfOrigin)
    
set_pev(entpev_originfOrigin)
    
    
set_pev(ent,pev_renderfx,kRenderFxGlowShell)
    switch(
random_num(1,4)) {
        case 
1set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})
        case 
2set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})
        case 
3set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})
        case 
4set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
    }
}
public 
fm_give_items(id) {
    new 
zombie bb_is_user_zombie(id)
    new 
random_num(114)
    switch(
i) {
        case 
1: {
            
fm_set_user_health(idget_user_health(id) + (zombie 500 50))
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_HEALTH_UP")
        }
        case 
2: {
            
fm_set_user_health(idget_user_health(id) - (zombie 250 25))
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_HEALTH_DOWN")
        }
        case 
3: {
            
cs_set_user_money(idcs_get_user_money(id) + random_num(15))
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_AMMOPACKS_UP")
        }
        case 
4: {
            
cs_set_user_money(idcs_get_user_money(id) - random_num(15))
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_AMMOPACKS_DOWN")
        }
        case 
5: {
            
fm_set_user_gravity(id0.5)
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_GRAVITY")
        }
        case 
6: {
            
cs_set_user_nvg(id1)
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_NIGHTVISION")
        }
        case 
7: {
            
fm_set_user_armor(idget_user_armor(id) + 100)
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_ARMOR_UP")
        }
        case 
8: {
            
fm_set_user_armor(idget_user_armor(id) - 100)
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_ARMOR_DOWN")
        }
        case 
9: {
            
set_pev(idpev_effectspev(idpev_effects) | EF_BRIGHTLIGHT)
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_BRIGHTLIGHT")
        }
        case 
10: {
            
fm_give_item(id"weapon_flashbang")
            
fm_give_item(id"weapon_smokegrenade")
            
fm_give_item(id"weapon_hegrenade")
            
            
set_pdata_int(idOFFSET_FLASH_AMMO3)
            
set_pdata_int(idOFFSET_HE_AMMO3)
            
set_pdata_int(idOFFSET_SMOKE_AMMO3)
            
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_GRENADES")
        }
        case 
11: {
            if (!
user_has_weapon(idCSW_SG550)) {
                
fm_give_item(id"weapon_sg550")
                
ExecuteHamB(Ham_GiveAmmoid30"556nato"90)
                
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_SG550")
            }
            else
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_NO")
        }
        case 
12: {
            if (!
user_has_weapon(idCSW_G3SG1)) {
                
fm_give_item(id"weapon_g3sg1")
                
ExecuteHamB(Ham_GiveAmmoid30"762nato"20)
                
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_G3SG1")
            }
            else
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_NO")
        }
        case 
13: {
            if (!
user_has_weapon(idCSW_M249)) {
                
fm_give_item(id"weapon_m249")
                
ExecuteHamB(Ham_GiveAmmoid100"9mm"200)
                
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_M249")
            }
            else
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_NO")
        }
        case 
14: {
            if (!
user_has_weapon(idCSW_AWP)) {
                
fm_give_item(id"weapon_awp")
                
ExecuteHamB(Ham_GiveAmmoid10"338magnum"30)
                
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_AWP")
            }
            else
                
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_NO")
        }
    }
}
public 
round_start() {
    new 
ent FM_NULLENT
    
static string_class[] = "classname"
    
while ((ent engfunc(EngFunc_FindEntityByStringentstring_classitem_class_name))) 
        
set_pev(entpev_flagsFL_KILLME)
}
stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!team""^3"// Team Color
    
replace_all(msg190"!team2""^0"// Team2 Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players)
                
write_byte(players);
                
write_string(msg);
                
message_end();
            }
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 
[/i][/i][/i][/i]
Steam ID: STEAM_1:0:70428872
Steam Name: Seps!s
Skype: jdm.csplague

Takdir ediliyorsan değil, Taklit ediliyorsan başarmışsın demektir.
Albert Einstein
Reply
#3
Bunun bb moduna uyarlandığından eminmisiniz ammo pack filan yok cünkü bb modunda ?
Reply
#4
xxxArda dateline='' Wrote: Bunun bb moduna uyarlandığından eminmisiniz ammo pack filan yok cünkü bb modunda ?


sorunsuz çalışıyor.
Tabutlara sığmayacak kadar intihar var, şeytanın siparişi
dünyanın ninnisi olmuş sirenler, ya RAB bizi özler
Şah damarım attıkça yaşını silerim çeşmin, solar hayat resmin
umut nerdesin,yine bittin nerelere gittin ben seni göremeden?

Sagopa Kajmer


Plugin Hakkında Herkeze Yardımcı Olabilirim.

Skype : [email protected]
Reply
#5
Tamamda ammo pack filanmı cıkıyor suanda Smile
Reply
#6
xxxArda dateline='' Wrote: Tamamda ammo pack filanmı cıkıyor suanda Smile

PHP Code:
case 3: {
            
cs_set_user_money(idcs_get_user_money(id) + random_num(15))
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_AMMOPACKS_UP")
        }
        case 
4: {
            
cs_set_user_money(idcs_get_user_money(id) - random_num(15))
            
ChatColor(id"!g[ZP]!y %L"LANG_PLAYER"ITEM_DM_AMMOPACKS_DOWN")
        } 

Ammo pack yerine para geliyor sen lang dosyası içerisindeki .txt dosyasını düzenlememişsin o yüzden ammo yazıyordur normalde para geliyor yani.
Steam ID: STEAM_1:0:70428872
Steam Name: Seps!s
Skype: jdm.csplague

Takdir ediliyorsan değil, Taklit ediliyorsan başarmışsın demektir.
Albert Einstein
Reply
#7
Yok düzenleme yapmadım etiketlediğin gönderide öyle yazıyorduda bende öyle sandım Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Antidllfile Eklenti, Modulu XSenonz 5 5,719 10-05-15, 22:36
Last Post: 41aaa41
  PodbotServere Göre [Eklenti Deil ] 41aaa41 3 2,526 20-02-15, 23:56
Last Post: eneskaraca55
  Hatalı Eklenti: JB givemoney yerine TL knsvsn 2 3,187 21-06-14, 20:44
Last Post: knsvsn
  Hatalı Eklenti: Glow Aim Plugini knsvsn 2 3,329 21-06-14, 20:43
Last Post: knsvsn
  Eklenti Düzenlemesi vitality5 3 5,370 28-05-14, 22:28
Last Post: lovbattery rh
  Bir eklenti istegi. FarkTR 3 3,126 09-10-12, 22:37
Last Post: Vampires
  Assault Mapler için eklenti. FarkTR 1 2,989 09-10-12, 19:07
Last Post: NiCoMeDiA
  Eklenti isteği! leafffan 2 4,326 16-07-12, 22:57
Last Post: leafffan
  Fullmod Plugini Eklenti asddsaasa 1 3,161 25-03-12, 15:31
Last Post: Losteps
  Jail BreaK Eklenti buuldyjailbreak 3 3,684 06-03-12, 03:53
Last Post: buuldyjailbreak

Foruma Atla:


Users browsing this thread: 1 Guest(s)