Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
ajutor plugin
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
569
xSk1ll3Dx
[Mentally Stable]
Status: Offline
(since 16-02-2016 20:07)
Joined: 24 Dec 2015
Posts: 35
,
Topics: 10
Location:
Romania
Reputation:
27.2
Votes
: 1
Posted: 24-01-2016, 09:49:20
| Translate post to:
... (
Click for more languages
)
Vreau ca acest plugin de golden deagle sa ramana toata mapa in loc de dagle normal ( ca la pluginul de M16 de pe alliedmodders )
Code:
/*
[ZP] Extra Item: Golden Deagle
Team: Humans
Description: This plugin adds a new weapon for Human Teams.
Weapon Cost: 20
Features:
- This weapon do more damage
- This weapon has zoom
- Launch Lasers
- This weapon has unlimited bullets
Credits:
KaOs - For his Dual MP5 mod
Cvars:
- zp_goldendg_dmg_multiplier <3> - Damage Multiplier for Golden Deagle
- zp_goldendg_gold_bullets <1|0> - Golden bullets effect ?
- zp_goldendg_custom_model <1|0> - Golden dg Custom Model
- zp_goldendg_unlimited_clip <1|0> - Golden dg Unlimited Clip
*/
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
#define is_valid_player(%1) (1 <= %1 <= 32)
new DG_V_MODEL[64] = "models/zombie_plague/v_golden_deagle.mdl"
new DG_P_MODEL[64] = "models/zombie_plague/p_golden_deagle.mdl"
/* Pcvars */
new cvar_dmgmultiplier, cvar_goldbullets, cvar_custommodel, cvar_uclip
// Item ID
new g_itemid
new bool:g_HasDg[33]
new g_hasZoom[ 33 ]
new bullets[ 33 ]
// Sprite
new m_spriteTexture
const Wep_deagle = ((1<<CSW_DEAGLE))
public plugin_init()
{
/* CVARS */
cvar_dmgmultiplier = register_cvar("zp_goldendg_dmg_multiplier", "3")
cvar_custommodel = register_cvar("zp_goldendg_custom_model", "1")
cvar_goldbullets = register_cvar("zp_goldendg_gold_bullets", "1")
cvar_uclip = register_cvar("zp_goldendg_unlimited_clip", "1")
// Register The Plugin
register_plugin("[ZP] Extra: Golden Deagle", "1.1", "AlejandroSk")
// Register Zombie Plague extra item
g_itemid = zp_register_extra_item("Golden Deagle (Damage x3)", 20, ZP_TEAM_HUMAN)
// Death Msg
register_event("DeathMsg", "Death", "a")
// Weapon Pick Up
register_event("WeapPickup","checkModel","b","1=19")
// Current Weapon Event
register_event("CurWeapon","checkWeapon","be","1=1")
register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
// Ham TakeDamage
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
register_forward( FM_CmdStart, "fw_CmdStart" )
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}
public client_connect(id)
{
g_HasDg[id] = false
}
public client_disconnect(id)
{
g_HasDg[id] = false
}
public Death()
{
g_HasDg[read_data(2)] = false
}
public fwHamPlayerSpawnPost(id)
{
g_HasDg[id] = false
}
public plugin_precache()
{
precache_model(DG_V_MODEL)
precache_model(DG_P_MODEL)
m_spriteTexture = precache_model("sprites/dot.spr")
precache_sound("weapons/zoom.wav")
}
public zp_user_infected_post(id)
{
if (zp_get_user_zombie(id))
{
g_HasDg[id] = false
}
}
public checkModel(id)
{
if ( zp_get_user_zombie(id) )
return PLUGIN_HANDLED
new szWeapID = read_data(2)
if ( szWeapID == CSW_DEAGLE && g_HasDg[id] == true && get_pcvar_num(cvar_custommodel) )
{
set_pev(id, pev_viewmodel2, DG_V_MODEL)
set_pev(id, pev_weaponmodel2, DG_P_MODEL)
}
return PLUGIN_HANDLED
}
public checkWeapon(id)
{
new plrClip, plrAmmo, plrWeap[32]
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if (plrWeapId == CSW_DEAGLE && g_HasDg[id])
{
checkModel(id)
}
else
{
return PLUGIN_CONTINUE
}
if (plrClip == 0 && get_pcvar_num(cvar_uclip))
{
// If the user is out of ammo..
get_weaponname(plrWeapId, plrWeap, 31)
// Get the name of their weapon
give_item(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
}
return PLUGIN_HANDLED
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_DEAGLE && g_HasDg[attacker] )
{
SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
}
}
public fw_CmdStart( 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 szClip, szAmmo
new szWeapID = get_user_weapon( id, szClip, szAmmo )
if( szWeapID == CSW_DEAGLE && g_HasDg[id] == true && !g_hasZoom[id] == true)
{
g_hasZoom[id] = true
cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
}
else if ( szWeapID == CSW_DEAGLE && g_HasDg[id] == true && g_hasZoom[id])
{
g_hasZoom[ id ] = false
cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
}
}
return PLUGIN_HANDLED
}
public make_tracer(id)
{
if (get_pcvar_num(cvar_goldbullets))
{
new clip,ammo
new wpnid = get_user_weapon(id,clip,ammo)
new pteam[16]
get_user_team(id, pteam, 15)
if ((bullets[id] > clip) && (wpnid == CSW_DEAGLE) && g_HasDg[id])
{
new vec1[3], vec2[3]
get_user_origin(id, vec1, 1) // origin; your camera point.
get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
//BEAMENTPOINTS
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (0) //TE_BEAMENTPOINTS 0
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_coord(vec2[0])
write_coord(vec2[1])
write_coord(vec2[2])
write_short( m_spriteTexture )
write_byte(1) // framestart
write_byte(5) // framerate
write_byte(2) // life
write_byte(10) // width
write_byte(0) // noise
write_byte( 255 ) // r, g, b
write_byte( 215 ) // r, g, b
write_byte( 0 ) // r, g, b
write_byte(200) // brightness
write_byte(150) // speed
message_end()
}
bullets[id] = clip
}
}
public zp_extra_item_selected(player, itemid)
{
if ( itemid == g_itemid )
{
if ( user_has_weapon(player, CSW_DEAGLE) )
{
drop_prim(player)
}
give_item(player, "weapon_deagle")
client_print(player, print_chat, "[ZP] You bought Golden Deagle")
g_HasDg[player] = true;
}
}
stock drop_prim(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num)
for (new i = 0; i < num; i++) {
if (Wep_deagle & (1<<weapons[i]))
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/
0
0
Back to top
Adryyy
[HLDS EXPLOITER]
Status: Offline
(since 16-09-2024 14:37)
Joined: 09 Apr 2012
Posts: 128
,
Topics: 6
Location:
Romania
Reputation:
117.3
Votes
: 10
Posted: 24-01-2016, 20:45:31
| Translate post to:
... (
Click for more languages
)
Spoiler:
/*
[ZP] Extra Item: Golden Deagle
Team: Humans
Description: This plugin adds a new weapon for Human Teams.
Weapon Cost: 20
Features:
- This weapon do more damage
- This weapon has zoom
- Launch Lasers
- This weapon has unlimited bullets
Credits:
KaOs - For his Dual MP5 mod
Cvars:
- zp_goldendg_dmg_multiplier <3> - Damage Multiplier for Golden Deagle
- zp_goldendg_gold_bullets <1|0> - Golden bullets effect ?
- zp_goldendg_custom_model <1|0> - Golden dg Custom Model
- zp_goldendg_unlimited_clip <1|0> - Golden dg Unlimited Clip
*/
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
#define is_valid_player(%1) (1 <= %1 <= 32)
new DG_V_MODEL[64] = "models/zombie_plague/v_golden_deagle.mdl"
new DG_P_MODEL[64] = "models/zombie_plague/p_golden_deagle.mdl"
/* Pcvars */
new cvar_dmgmultiplier, cvar_goldbullets, cvar_custommodel, cvar_uclip
new bool:g_HasDg[33]
new g_hasZoom[ 33 ]
new bullets[ 33 ]
// Sprite
new m_spriteTexture
const Wep_deagle = ((1<<CSW_DEAGLE))
public plugin_init()
{
/* CVARS */
cvar_dmgmultiplier = register_cvar("zp_goldendg_dmg_multiplier", "3")
cvar_custommodel = register_cvar("zp_goldendg_custom_model", "1")
cvar_goldbullets = register_cvar("zp_goldendg_gold_bullets", "1")
cvar_uclip = register_cvar("zp_goldendg_unlimited_clip", "1")
// Register The Plugin
register_plugin("[ZP] Extra: Golden Deagle", "1.1", "AlejandroSk")
// Death Msg
register_event("DeathMsg", "Death", "a")
// Weapon Pick Up
register_event("WeapPickup","checkModel","b","1=19")
// Current Weapon Event
register_event("CurWeapon","checkWeapon","be","1=1")
register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
// Ham TakeDamage
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
register_forward( FM_CmdStart, "fw_CmdStart" )
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}
public client_connect(id)
{
g_HasDg[id] = false
}
public client_disconnect(id)
{
g_HasDg[id] = false
}
public Death()
{
g_HasDg[read_data(2)] = false
}
public fwHamPlayerSpawnPost( id )
{
if( !zp_get_user_zombie( id ) && is_user_alive( id ) && get_user_team( id ) != 3 /*&& get_user_weapon( id ) == CSW_DEAGLE*/ && !g_HasDG[ id ] )
{
if( user_has_weapon( id, CSW_DEAGLE ) )
{
drop_prim( id );
}
g_HasDg[ id ] = true;
give_item( id, "weapon_deagle" );
}
}
public plugin_precache()
{
precache_model(DG_V_MODEL)
precache_model(DG_P_MODEL)
m_spriteTexture = precache_model("sprites/dot.spr")
precache_sound("weapons/zoom.wav")
}
public zp_user_infected_post(id)
{
if (zp_get_user_zombie(id))
{
g_HasDg[id] = false
}
}
public checkModel(id)
{
if ( zp_get_user_zombie(id) )
return PLUGIN_HANDLED
new szWeapID = read_data(2)
if ( szWeapID == CSW_DEAGLE && g_HasDg[id] == true && get_pcvar_num(cvar_custommodel) )
{
set_pev(id, pev_viewmodel2, DG_V_MODEL)
set_pev(id, pev_weaponmodel2, DG_P_MODEL)
}
return PLUGIN_HANDLED
}
public checkWeapon(id)
{
new plrClip, plrAmmo, plrWeap[32]
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if (plrWeapId == CSW_DEAGLE && g_HasDg[id])
{
checkModel(id)
}
else
{
return PLUGIN_CONTINUE
}
if (plrClip == 0 && get_pcvar_num(cvar_uclip))
{
// If the user is out of ammo..
get_weaponname(plrWeapId, plrWeap, 31)
// Get the name of their weapon
give_item(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
}
return PLUGIN_HANDLED
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_DEAGLE && g_HasDg[attacker] )
{
SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
}
}
public fw_CmdStart( 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 szClip, szAmmo
new szWeapID = get_user_weapon( id, szClip, szAmmo )
if( szWeapID == CSW_DEAGLE && g_HasDg[id] == true && !g_hasZoom[id] == true)
{
g_hasZoom[id] = true
cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
}
else if ( szWeapID == CSW_DEAGLE && g_HasDg[id] == true && g_hasZoom[id])
{
g_hasZoom[ id ] = false
cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
}
}
return PLUGIN_HANDLED
}
public make_tracer(id)
{
if (get_pcvar_num(cvar_goldbullets))
{
new clip,ammo
new wpnid = get_user_weapon(id,clip,ammo)
new pteam[16]
get_user_team(id, pteam, 15)
if ((bullets[id] > clip) && (wpnid == CSW_DEAGLE) && g_HasDg[id])
{
new vec1[3], vec2[3]
get_user_origin(id, vec1, 1) // origin; your camera point.
get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
//BEAMENTPOINTS
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (0) //TE_BEAMENTPOINTS 0
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_coord(vec2[0])
write_coord(vec2[1])
write_coord(vec2[2])
write_short( m_spriteTexture )
write_byte(1) // framestart
write_byte(5) // framerate
write_byte(2) // life
write_byte(10) // width
write_byte(0) // noise
write_byte( 255 ) // r, g, b
write_byte( 215 ) // r, g, b
write_byte( 0 ) // r, g, b
write_byte(200) // brightness
write_byte(150) // speed
message_end()
}
bullets[id] = clip
}
}
stock drop_prim(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num)
for (new i = 0; i < num; i++) {
if (Wep_deagle & (1<<weapons[i]))
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/
( -_・) ︻デ═一 ▸❀ヅ❤♫
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 11-01-2025, 08:02:44
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details