Преработка на 7 VZBB плъгина.

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Заключено
Аватар
DoPe ;]]
Извън линия
Потребител
Потребител
Мнения: 402
Регистриран на: 27 Фев 2017, 22:10
Обратна връзка:

Преработка на 7 VZBB плъгина.

Мнение от DoPe ;]] » 03 Мар 2018, 19:49

Така, искам да се преработят тези плъгини за да може да се ползват веднъж на spawn, и при повторен опит да изпише: You already have purchased this, try again next spawn.
Прикачени файлове
Desktop.rar
(12.46 KiB) Свалено 56 пъти
Desktop.rar
(12.46 KiB) Свалено 56 пъти
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6902
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 116 пъти
Получена благодарност: 1020 пъти
Обратна връзка:

Преработка на 7 VZBB плъгина.

Мнение от OciXCrom » 03 Мар 2018, 19:59

Чак пък 7... Не бих се занимавал. Направих ти първия и означих с "////////////////" какво съм добавил за да го направиш и в другите.

Код за потвърждение: Избери целия код

/*
---------------------------------------------------------
   #  #  #    #===    ###    ##    #
  #    ##     #===   #      #  #    #
   #   #      #===    ###    ##    #
---------------------------------------------------------
VZBB Item: Antidote 1.4

Plugin made by <VeCo>

If you modify the code, please DO NOT change the author!

***
This is a default shop item for <VeCo>'s Zombie BaseBuilder Mod.
***
---------------------------------------------------------
Contacts:
e-mail: [email protected]
skype: veco_kn
---------------------------------------------------------
Changes log:
 -> v 1.0 = First release!
 -> v 1.1 = Updated register native for version 3.0.
 -> v 1.2 = Updated for version 3.5.
 -> v 1.3 = Updated for version 3.8.
 -> v 1.4 = Updated for version 4.0.
---------------------------------------------------------
Don't forget to visit http://www.amxmodxbg.org :)
---------------------------------------------------------
*/

#include <amxmodx>
#include <vzbb_mod>
#include <engine>
#include <colorchat>
#include <hamsandwich> ///////////////////////////////////////////////////////

new cvar_item_antidote_cost, itemid
new bool:g_bPurchased[33] ///////////////////////////////////////////////////////

public plugin_precache() precache_sound("items/smallmedkit1.wav")

public plugin_init() {
	register_plugin("VZBB Item: Antidote", "1.4", "<VeCo>")
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1) ///////////////////////////////////////////////////////
	
	cvar_item_antidote_cost = register_cvar("vzbb_item_antidote_cost","75")
	
	itemid = register_shop_item("Antidote",get_pcvar_num(cvar_item_antidote_cost),USE_BATTLE,TEAM_ZOMBIES,ADMIN_ALL,NO_MAX_BUYS)
}

public OnPlayerSpawn(id) ///////////////////////////////////////////////////////
{
	if(is_user_alive(id))
		g_bPurchased[id] = false
} ///////////////////////////////////////////////////////

public shop_item_selected(id,shopitemid)
{
	if(itemid != shopitemid) return PLUGIN_CONTINUE
	
	if(g_bPurchased[id]) ///////////////////////////////////////////////////////
	{
		ColorChat(id,GREEN,"[VZBB]^x01 You can only buy this item once per spawn!")
		return PLUGIN_HANDLED
	} ///////////////////////////////////////////////////////
	
	static players[32],num
	get_players(players,num,"ae","TERRORIST")
	
	if(num < 2)
	{
		ColorChat(id,GREEN,"[VZBB]^x01 You can't buy this item. You are the only zombie!")
		
		return FORWARD_CONTINUE
	}
	
	user_uninfect(id)
	emit_sound(id,CHAN_AUTO,"items/smallmedkit1.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM)
	
	static name[32]
	get_user_name(id,name,31)
	
	ColorChat(0,GREEN,"[VZBB] %s^x01 bought an^x04 Antidote^x01.",name)
	
	return PLUGIN_CONTINUE
}

Аватар
DoPe ;]]
Извън линия
Потребител
Потребител
Мнения: 402
Регистриран на: 27 Фев 2017, 22:10
Обратна връзка:

Преработка на 7 VZBB плъгина.

Мнение от DoPe ;]] » 03 Мар 2018, 20:06

Доста ми е объркано... Надявам се някой да го направи.
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6902
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 116 пъти
Получена благодарност: 1020 пъти
Обратна връзка:

Преработка на 7 VZBB плъгина.

Мнение от OciXCrom » 03 Мар 2018, 20:07

Нищо не е объркано, изобщо погледна ли? Буквално трябва да добавиш нещата където им е мястото в останалите плъгини.

Аватар
User12
Извън линия
Потребител
Потребител
Мнения: 312
Регистриран на: 25 Яну 2018, 22:39
Местоположение: Сливен
Се отблагодари: 37 пъти
Получена благодарност: 10 пъти
Обратна връзка:

Преработка на 7 VZBB плъгина.

Мнение от User12 » 03 Мар 2018, 22:33

Тествай и кажи дали ти вършат работа :

vzbb_item_protection

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <hamsandwich>
#include <vzbb_mod>
#include <cromchat>
#include <fun>

new cvar_item_protection_cost,cvar_item_protection_time, itemid

new const g_iLimit = 1
new g_iUses[33]

public plugin_init() {
	register_plugin("VZBB Item: Protection", "1.4", "<VeCo>")
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
	
	cvar_item_protection_cost = register_cvar("vzbb_item_protection_cost","6")
	cvar_item_protection_time = register_cvar("vzbb_item_protection_time","5.0")
	
	itemid = register_shop_item("Protection",get_pcvar_num(cvar_item_protection_cost),USE_BATTLE,TEAM_BOTH,ADMIN_ALL,NO_MAX_BUYS)
	
	CC_SetPrefix("&x03[&x04 BaseBuilder&x03 ]&x01")
}

public OnPlayerSpawn(id) 
{
	g_iUses[id] = 0
}
public shop_item_selected(id,shopitemid)
{
	if(itemid != shopitemid) return PLUGIN_CONTINUE
	if(get_user_godmode(id))
	{
		CC_SendMessage(id, "You can't buy this item. Your protection is still working!")
		
		return PLUGIN_HANDLED
	}
	if(g_iUses[id] < g_iLimit)
	{
		set_user_godmode(id,1)
		set_user_rendering(id,kRenderFxGlowShell, is_user_human(id) ? 0 : 255,0,is_user_human(id) ? 255 : 0, kRenderNormal, 60)
		
		CC_SendMessage(id, "You have bought^x03 Protection^x01.")
		
		set_task(get_pcvar_float(cvar_item_protection_time),"remove_protection",id)
		g_iUses[id]++
	}
	else
	{
		CC_SendMessage(id, "&x01You can only buy this item once per spawn!")
		return PLUGIN_HANDLED
}
	return PLUGIN_CONTINUE
}

public remove_protection(id)
{
	if(!is_user_connected(id)) return
	
	set_user_godmode(id,0)
	restore_user_rendering(id)
	
	CC_SendMatched(id,CC_COLOR_TEAM,"Your protection has been^3 removed^1.")
}
vzbb_item_goldenm4a1

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <cromchat>
#include <vzbb_mod>
#include <stripweapons>

#define IsBuildPhase() user_can_build()
#define USE_FOR_SHOP 1

//new const g_szPrefix[ ] = "[ Veco BaseBuilder ]";

new const GOLDENM4_VMODEL[ ] = "models/v_golden_m4a1.mdl";
new const GOLDENM4_PMODEL[ ] = "models/p_golden_m4a1.mdl";

new const DEFAULT_VMODEL[ ] = "models/v_m4a1.mdl";
new const DEFAULT_PMODEL[ ] = "models/p_m4a1.mdl";

new const g_iLimit = 1
new g_iUses[33]

#if USE_FOR_SHOP == 1
    new g_Item;
    new g_ItemPrice = 40;
#else
    #define VIP_GOLDENM4_FLAG ADMIN_KICK    // flag: 'c'
    new const szSayCmds[ ][ ] =
    {
        "say /goldenm4a1",    "say_team /goldenm4a1",
        "say /gm4a1",     "say_team /gm4a1",
        "say goldenm4a1",     "say_team goldenm4a1"
    };
#endif

new bool:g_blGoldenM4[ 33 ], g_blHasZoom[ 33 ];
new g_iGoldenBullet;

public plugin_init( )
{
    register_plugin( "[ZBB Addon] Golden m4a1", "1.0", "One Above All" );
    
    CC_SetPrefix("&x03[&x04 BaseBuilder&x03 ]&x01")
    register_event( "CurWeapon", "fwChangeModel", "be", "1=1", "2=28" );
    
    register_forward( FM_CmdStart, "fwCmdStart" );
    
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1 );
    RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage" );
    RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_m4a1", "fwPrimaryAttack", 1 );
    
    #if USE_FOR_SHOP == 1
        g_Item = register_shop_item( "Golden M4a1", g_ItemPrice, USE_BATTLE, TEAM_HUMANS, ADMIN_ALL, NO_MAX_BUYS );
    #else
        for( new i = 0; i < sizeof szSayCmds; i++ )
            register_clcmd( szSayCmds[ i ], "GetGoldenM4" );
    #endif
}
public plugin_precache( )
{
    precache_model(GOLDENM4_VMODEL);
    precache_model(GOLDENM4_PMODEL);
    
    g_iGoldenBullet = precache_model( "sprites/dot.spr" );
}
public fwCmdStart( id, uc_handle, seed )
{
    if ( !is_user_alive( id ))
        return PLUGIN_HANDLED;
    
    if ( ( get_uc( uc_handle, UC_Buttons) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new iClip, iAmmo, iWeaponId = get_user_weapon( id, iClip, iAmmo );
        
        if ( iWeaponId != CSW_M4A1 || !g_blGoldenM4[ id ] )
            return PLUGIN_HANDLED;
        
        g_blHasZoom[ id ] = !g_blHasZoom[ id ];
        cs_set_user_zoom( id, g_blHasZoom[ id ] ? CS_SET_AUGSG552_ZOOM : CS_RESET_ZOOM, 0 );
        emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", ( g_blHasZoom[ id ] ? 0.20 : 0.0), 2.40, 0, 100 );
    }
    return PLUGIN_HANDLED;
}
public fwHamPlayerSpawnPost( id )
{
    if ( is_user_alive( id ) )
    {
        g_blGoldenM4[ id ] = false;
        g_blHasZoom[ id ] = false;
    }
}
public OnPlayerSpawn(id) 
{
	g_iUses[id] = 0
}

#if USE_FOR_SHOP == 1
public shop_item_selected( id, itemid )
{
	if ( itemid != g_Item ) return PLUGIN_HANDLED;
	if(g_iUses[id] < g_iLimit)
	{
		StripWeapons( id, Primary, true );
		fm_give_item( id, "weapon_m4a1" );
		g_blGoldenM4[ id ] = true;
		
		CC_SendMessage(id, "You have bought a^x03 Golden M4A1^x01!");
		g_iUses[id]++
	}
	else
	{
		CC_SendMessage(id, "&x01You can only buy this item once per spawn!")
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
   }

#else
public GetGoldenM4(id)
{
    if ( get_user_team( id ) == 2 && IsBuildPhase( ) )  // Ako igrcha e CT, no e po vreme na build time.
    {
        CC_SendMatched(id,CC_COLOR_TEAM,"You can get^x03 Golden M4A1^x01 after the build phase!" );
        g_blGoldenM4[ id ] = false;
        return;
    }
    if ( !is_user_alive( id ) )  // Ako igracha ne e jiv.
    {
        CC_SendMatched(id,CC_COLOR_TEAM,"You must be^x03 alive^x01 to use this command!" );
        return;
    }
    if ( get_user_team( id ) != 2 ) // Ako igracha ne e CT
    {
        CC_SendMatched(id,CC_COLOR_TEAM,"Only^x03 Counter-Terrorist^x01 can use this command!" );
        return;
    }
    if ( get_user_flags( id ) & VIP_GOLDENM4_FLAG )
    {
        if ( !g_blGoldenM4[ id ] )
        {
            StripWeapons( id, Primary, true );
            fm_give_item( id, "weapon_m4a1" );
            cs_set_user_bpammo( id, CSW_M4A1, 254 );
            g_blGoldenM4[ id ] = true;
            CC_SendMatched(id,CC_COLOR_TEAM,"You have successfully got^x03 Golden M4A1^x01!" );
        }
        else
        {
            CC_SendMatched(id,CC_COLOR_TEAM,"You have already^x03 Golden M4A1^x01!" );
            return;
        }
    }
    else
    {
        ColorChat( id, TEAM_COLOR, "^x04%s^x01 Only VIP Users have access for^x03 Golden M4A1^x01!", g_szPrefix );
        return;
    }
    return;
}
#endif
public fwTakeDamage( iVictim, iInflictor, iAttacker, Float:flDamage, iDamageBits )
{
    if ( is_user_alive( iAttacker ) && iAttacker != iVictim )
    {
        if ( g_blGoldenM4[ iAttacker ] && get_user_weapon( iAttacker ) == CSW_M4A1 )
            SetHamParamFloat( 4, flDamage * 2 );
    }
}

public fwPrimaryAttack( iWeaponIndex )
{
    new id = pev( iWeaponIndex, pev_owner );
    
    new iClip, iAmmo, iWeapon = get_user_weapon( id, iClip, iAmmo );
    
    if ( !iClip || iWeapon != CSW_M4A1 || !g_blGoldenM4[ id ] )
        return;
    
    new iVector[ 2 ][ 3 ];
    get_user_origin( id, iVector[ 0 ], 1 );  // origin; your camera point.
    get_user_origin( id, iVector[ 1 ], 2 );  // termin; where your bullet goes - Default: 2
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY );
    write_byte( TE_BEAMPOINTS );
    write_coord( iVector[ 0 ][ 0 ] );
    write_coord( iVector[ 0 ][ 1 ] );
    write_coord( iVector[ 0 ][ 2 ] );
    write_coord( iVector[ 1 ][ 0 ] );
    write_coord( iVector[ 1 ][ 1 ] );
    write_coord( iVector[ 1 ][ 2 ] );
    write_short( g_iGoldenBullet);
    write_byte( 1 );         // Start frame  - Default: 1
    write_byte( 5 );       // Frame rate   - Default: 5
    write_byte( 2 );          // Life     - Default: 2
    write_byte( 10 );      // Width    - Default: 10
    write_byte( 0 );       // Noise    - Default: 0
    write_byte( 255 );     // Red      - Default: 255
    write_byte( 215 );     // Green    - Default: 215
    write_byte( 0 );       // Blue     - Default: 0
    write_byte( 200 );     // Brightness   - Default: 200
    write_byte( 150 );     // Speed    - Default: 150
    message_end( );
    
}
public fwChangeModel( id )
{
    set_pev( id, pev_viewmodel2, g_blGoldenM4[ id ] ? GOLDENM4_VMODEL : DEFAULT_VMODEL );
    set_pev( id, pev_weaponmodel2, g_blGoldenM4[ id ] ? GOLDENM4_PMODEL : DEFAULT_PMODEL );
}
vzbb_item_antidote

Код за потвърждение: Избери целия код

/*
---------------------------------------------------------
   #  #  #    #===    ###    ##    #
  #    ##     #===   #      #  #    #
   #   #      #===    ###    ##    #
---------------------------------------------------------
VZBB Item: Antidote 1.4

Plugin made by <VeCo>

If you modify the code, please DO NOT change the author!

***
This is a default shop item for <VeCo>'s Zombie BaseBuilder Mod.
***
---------------------------------------------------------
Contacts:
e-mail: [email protected]
skype: veco_kn
---------------------------------------------------------
Changes log:
 -> v 1.0 = First release!
 -> v 1.1 = Updated register native for version 3.0.
 -> v 1.2 = Updated for version 3.5.
 -> v 1.3 = Updated for version 3.8.
 -> v 1.4 = Updated for version 4.0.
---------------------------------------------------------
Don't forget to visit http://www.amxmodxbg.org :)
---------------------------------------------------------
*/

#include <amxmodx>
#include <hamsandwich>
#include <vzbb_mod>
#include <engine>
#include <cromchat>

new cvar_item_antidote_cost, itemid
public plugin_precache() precache_sound("items/smallmedkit1.wav")

new const g_iLimit = 1
new g_iUses[33]

public plugin_init() {
	register_plugin("VZBB Item: Antidote", "1.4", "<VeCo>")
	
	cvar_item_antidote_cost = register_cvar("vzbb_item_antidote_cost","75")
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
	
	itemid = register_shop_item("Antidote",get_pcvar_num(cvar_item_antidote_cost),USE_BATTLE,TEAM_ZOMBIES,ADMIN_ALL,NO_MAX_BUYS)
}

public shop_item_selected(id,shopitemid)
{
	if(itemid != shopitemid) return PLUGIN_CONTINUE
	if(g_iUses[id] < g_iLimit)
	{
		user_uninfect(id)
		emit_sound(id,CHAN_AUTO,"items/smallmedkit1.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM)
		
		static name[32]
		get_user_name(id,name,31)
		
		CC_SendMessage(0, "^1[^4VZBB^1] ^4%s^x01 bought an^x04 Antidote^x01.",name)
		g_iUses[id]++
	}
	else
	{
		CC_SendMessage(id, "&x03[&x04 BaseBuilder&x03 ]&x01You can only buy this item once per spawn!")
		return PLUGIN_HANDLED
	}	
	
	static players[32],num
	get_players(players,num,"ae","TERRORIST")
	
	if(num < 2)
	{
		CC_SendMessage(id, "^4[VZBB]^x01 You can't buy this item. You are the only zombie!")
		
		return FORWARD_CONTINUE
	}
	return PLUGIN_CONTINUE
}
vzbb_item_goldenm3

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <cromchat>
#include <vzbb_mod>
#include <stripweapons>

#define IsBuildPhase() user_can_build()
#define USE_FOR_SHOP 1

//new const g_szPrefix[ ] = "[ Veco BaseBuilder ]";

new const GOLDENM3_VMODEL[ ] = "models/v_golden_m3.mdl";
new const GOLDENM3_PMODEL[ ] = "models/p_golden_m3.mdl";

new const DEFAULT_VMODEL[ ] = "models/v_m3.mdl";
new const DEFAULT_PMODEL[ ] = "models/p_m3.mdl";

new const g_iLimit = 1
new g_iUses[33]

#if USE_FOR_SHOP == 1
    new g_Item;
    new g_ItemPrice = 35;
#else
    #define VIP_GOLDENM3_FLAG ADMIN_KICK    // flag: 'c'
    new const szSayCmds[ ][ ] =
    {
        "say /goldenm3",    "say_team /goldenm3",
        "say /gm3",     "say_team /gm3",
        "say goldenm3",     "say_team goldenm3"
    };
#endif

new bool:g_blGoldenM3[ 33 ], g_blHasZoom[ 33 ];
new g_iGoldenBullet;

public plugin_init( )
{
    register_plugin( "[ZBB Addon] Golden M3", "1.0", "One Above All" );
    CC_SetPrefix("&x03[&x04 BaseBuilder&x03 ]&x01")

    register_event( "CurWeapon", "fwChangeModel", "be", "1=1", "2=28" );
    register_forward( FM_CmdStart, "fwCmdStart" );
    
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1 );
    RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage" );
    RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_m3", "fwPrimaryAttack", 1 );
    
    #if USE_FOR_SHOP == 1
        g_Item = register_shop_item( "Golden M3", g_ItemPrice, USE_BATTLE, TEAM_HUMANS, ADMIN_ALL, NO_MAX_BUYS );
    #else
        for( new i = 0; i < sizeof szSayCmds; i++ )
            register_clcmd( szSayCmds[ i ], "GetGoldenM3" );
    #endif
}
public plugin_precache( )
{
    precache_model(GOLDENM3_VMODEL);
    precache_model(GOLDENM3_PMODEL);
    
    g_iGoldenBullet = precache_model( "sprites/dot.spr" );
}
public fwCmdStart( id, uc_handle, seed )
{
    if ( !is_user_alive( id ))
        return PLUGIN_HANDLED;
    
    if ( ( get_uc( uc_handle, UC_Buttons) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new iClip, iAmmo, iWeaponId = get_user_weapon( id, iClip, iAmmo );
        
        if ( iWeaponId != CSW_M3 || !g_blGoldenM3[ id ] )
            return PLUGIN_HANDLED;
        
        g_blHasZoom[ id ] = !g_blHasZoom[ id ];
        cs_set_user_zoom( id, g_blHasZoom[ id ] ? CS_SET_AUGSG552_ZOOM : CS_RESET_ZOOM, 0 );
        emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", ( g_blHasZoom[ id ] ? 0.20 : 0.0), 2.40, 0, 100 );
    }
    return PLUGIN_HANDLED;
}
public fwHamPlayerSpawnPost( id )
{
    if ( is_user_alive( id ) )
    {
        g_blGoldenM3[ id ] = false;
        g_blHasZoom[ id ] = false;
    }
}

public OnPlayerSpawn(id) 
{
	g_iUses[id] = 0
}

#if USE_FOR_SHOP == 1
public shop_item_selected( id, itemid )
{
	if ( itemid != g_Item ) return PLUGIN_HANDLED;
	if(g_iUses[id] < g_iLimit)
	{
		StripWeapons( id, Primary, true );
		fm_give_item( id, "weapon_m3" );
		g_blGoldenM3[ id ] = true;
		
		CC_SendMessage(id, "You have bought a^x03 Golden M3^x01!");
		g_iUses[id]++
	}
	else
	{
		CC_SendMessage(id, "&x01You can only buy this item once per spawn!")
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
}

#else
public GetGoldenM3(id)
{
    if ( get_user_team( id ) == 2 && IsBuildPhase( ) )  // Ako igrcha e CT, no e po vreme na build time.
    {
        CC_SendMatched(id, CC_COLOR_TEAM,"You can get^x03 Golden M3^x01 after the build phase!" );
        g_blGoldenM3[ id ] = false;
        return;
    }
    if ( !is_user_alive( id ) )  // Ako igracha ne e jiv.
    {
        CC_SendMatched(id, CC_COLOR_TEAM,"You must be^x03 alive^x01 to use this command!" );
        return;
    }
    if ( get_user_team( id ) != 2 ) // Ako igracha ne e CT
    {
        CC_SendMatched(id, CC_COLOR_TEAM,"Only^x03 Counter-Terrorist^x01 can use this command!" );
        return;
    }
    if ( get_user_flags( id ) & VIP_GOLDENM3_FLAG )
    {
        if ( !g_blGoldenM3[ id ] )
        {
            StripWeapons( id, Primary, true );
            fm_give_item( id, "weapon_m3" );
            cs_set_user_bpammo( id, CSW_M3, 254 );
            g_blGoldenM3[ id ] = true;
            CC_SendMatched(id, CC_COLOR_TEAM,"You have successfully got^x03 Golden M3^x01!" );
        }
        else
        {
            CC_SendMatched(id, CC_COLOR_TEAM,"You have already^x03 Golden M3^x01!" );
            return;
        }
    }
    else
    {
        CC_SendMessage( id, CC_COLORS_TEAM, "^x04%s^x01 Only VIP Users have access for^x03 Golden M3A1^x01!", g_szPrefix );
        return;
    }
    return;
}
#endif
public fwTakeDamage( iVictim, iInflictor, iAttacker, Float:flDamage, iDamageBits )
{
    if ( is_user_alive( iAttacker ) && iAttacker != iVictim )
    {
        if ( g_blGoldenM3[ iAttacker ] && get_user_weapon( iAttacker ) == CSW_M3 )
            SetHamParamFloat( 4, flDamage * 2 );
    }
}

public fwPrimaryAttack( iWeaponIndex )
{
    new id = pev( iWeaponIndex, pev_owner );
    
    new iClip, iAmmo, iWeapon = get_user_weapon( id, iClip, iAmmo );
    
    if ( !iClip || iWeapon != CSW_M3 || !g_blGoldenM3[ id ] )
        return;
    
    new iVector[ 2 ][ 3 ];
    get_user_origin( id, iVector[ 0 ], 1 );  // origin; your camera point.
    get_user_origin( id, iVector[ 1 ], 2 );  // termin; where your bullet goes - Default: 2
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY );
    write_byte( TE_BEAMPOINTS );
    write_coord( iVector[ 0 ][ 0 ] );
    write_coord( iVector[ 0 ][ 1 ] );
    write_coord( iVector[ 0 ][ 2 ] );
    write_coord( iVector[ 1 ][ 0 ] );
    write_coord( iVector[ 1 ][ 1 ] );
    write_coord( iVector[ 1 ][ 2 ] );
    write_short( g_iGoldenBullet);
    write_byte( 1 );         // Start frame  - Default: 1
    write_byte( 5 );       // Frame rate   - Default: 5
    write_byte( 2 );          // Life     - Default: 2
    write_byte( 10 );      // Width    - Default: 10
    write_byte( 0 );       // Noise    - Default: 0
    write_byte( 255 );     // Red      - Default: 255
    write_byte( 215 );     // Green    - Default: 215
    write_byte( 0 );       // Blue     - Default: 0
    write_byte( 200 );     // Brightness   - Default: 200
    write_byte( 150 );     // Speed    - Default: 150
    message_end( );
    
}
public fwChangeModel( id )
{
    set_pev( id, pev_viewmodel2, g_blGoldenM3[ id ] ? GOLDENM3_VMODEL : DEFAULT_VMODEL );
    set_pev( id, pev_weaponmodel2, g_blGoldenM3[ id ] ? GOLDENM3_PMODEL : DEFAULT_PMODEL );
}
Каналът ми в YouTube : Георги Пламенов

Изображение

Аватар
DoPe ;]]
Извън линия
Потребител
Потребител
Мнения: 402
Регистриран на: 27 Фев 2017, 22:10
Обратна връзка:

Преработка на 7 VZBB плъгина.

Мнение от DoPe ;]] » 03 Мар 2018, 22:37

Заключете.
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Google [Bot] и 13 госта