Raised This Month: $32 Target: $400
 8% 

Can fix this gold deagle for vips pls !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mohamed null
BANNED
Join Date: Sep 2020
Location: Algeria
Old 09-24-2020 , 10:22   Can fix this gold deagle for vips pls !
Reply With Quote #1

/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#include <fakemeta>

#include <fun>

#include <hamsandwich>

#include <cstrike>

#include <amxmisc>



#define is_valid_player(%1) (1 <= %1 <= 32)

#define PLUGIN "Golden Deagle"

#define VERSION "1.0"

#define AUTHOR "alicx"



new DEAGLE_V_MODEL[64] = "models/v_golden_deagle.mdl"

new DEAGLE_P_MODEL[64] = "models/p_golden_deagle.mdl"



/* Pcvars */

new cvar_dmgmultiplier, cvar_goldbullets, cvar_custommodel, cvar_cost, cvar_bullets, cvar_keepdeagle, cvar_zoom_type;



new bool:g_HasDeagle[33]



new g_hasZoom[ 33 ]

new g_ZoomDist[ 33 ] = 0

new bullets[ 33 ]



// Sprite

new m_spriteTexture



const Wep_deagle = ((1<<CSW_DEAGLE))





public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)



// The Cvars //

cvar_dmgmultiplier = register_cvar("goldendeagle_dmg_multiplier", "5")

cvar_custommodel = register_cvar("goldendeagle_custom_model", "1")

cvar_goldbullets = register_cvar("goldendeagle_gold_bullets", "1")

cvar_cost = register_cvar("goldendeagle_cost", "16000")

cvar_bullets = register_cvar("goldendeagle_bullets", "200")

cvar_keepdeagle = register_cvar("goldendeagle_keep", "1")

cvar_zoom_type = register_cvar("goldendeagle_zoom_type", "4")





// Register The Buy Cmd

register_clcmd("say /goldendeagle", "CmdBuyDeagle")

register_clcmd("say_team /goldendeagle", "CmdBuyDeagle")

register_concmd("amx_goldendeagle", "CmdGiveDeagle", ADMIN_BAN, "<name>")



//Death Msg

register_event("DeathMsg", "Death", "a")



// Weapon Pick Up

register_event("WeapPickup","checkModel","b", "1=19")



// Current Weapon Event

register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")



// Ham TakeDamage

RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")

register_forward( FM_CmdStart, "fw_CmdStart")

register_forward(FM_CmdStart, "fwCmdStart")

RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

}



public plugin_precache()

{

precache_model(DEAGLE_V_MODEL)

precache_model(DEAGLE_P_MODEL)

m_spriteTexture = precache_model("sprites/dot.spr")

precache_sound("weapons/zoom.wav")

}



public client_connect(id)

{

g_HasDeagle[id] = false

}



public client_disconnect(id)

{

g_HasDeagle[id] = false

}



public Death()

{

g_HasDeagle[read_data(2)] = false

}



public fwHamPlayerSpawnPost(id)

{

if( !is_user_alive( id ) )

return;



if( get_pcvar_num( cvar_keepdeagle ) )

{

if( user_has_weapon( id, CSW_DEAGLE ) )

{

g_HasDeagle[id] = true

}

else {

g_HasDeagle[id] = false;

}

}

else {

g_HasDeagle[id] = false;

}

}



public checkModel(id)

{

if ( !g_HasDeagle[id] )

return PLUGIN_HANDLED



new szWeapID = read_data(2)



if ( szWeapID == CSW_DEAGLE && g_HasDeagle[id] == true && get_pcvar_num(cvar_custommodel) )

{

set_pev(id, pev_viewmodel2, DEAGLE_V_MODEL)

set_pev(id, pev_weaponmodel2, DEAGLE_P_MODEL)

}

return PLUGIN_HANDLED

}





public fw_TakeDamage(victim, inflictor, attacker, Float:damage)

{

if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_DEAGLE && g_HasDeagle[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_HasDeagle[id] && !g_hasZoom[ id ] )

{

golden_deagle_zoom( id, get_pcvar_num( cvar_zoom_type ) )

}

else if ( szWeapID == CSW_DEAGLE && g_HasDeagle[id] && g_hasZoom[id])

{

g_hasZoom[ id ] = false

cs_set_user_zoom( id, CS_RESET_ZOOM, 1 )

}

}

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_HasDeagle[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 CmdBuyDeagle(id)

{

if ( !is_user_alive(id) )

{

client_print(id,print_chat, "[AMXX] To buy golden Deagle You need to be alive!")

return PLUGIN_HANDLED

}



new money = cs_get_user_money(id)



if (money >= get_pcvar_num(cvar_cost) && get_pcvar_num(cvar_bullets))

{

cs_set_user_money(id, money - get_pcvar_num(cvar_cost))

give_item(id, "weapon_deagle")

give_item(id, "ammo_50ae")

cs_set_user_bpammo(id, CSW_DEAGLE, get_pcvar_num(cvar_bullets))

g_HasDeagle[id] = true

}



else

{

client_print(id, print_chat, "[AMXX] You dont hav enough money to buy Golden Deagle. Cost $%d ", get_pcvar_num(cvar_cost))

}

return PLUGIN_HANDLED

}



public CmdGiveDeagle(id,level,cid)

{

if (!cmd_access(id,level,cid,2))

return PLUGIN_HANDLED;

new arg[32];

read_argv(1,arg,31);



new player = cmd_target(id,arg,7);

if (!player)

return PLUGIN_HANDLED;



new name[32];

get_user_name(player,name,31);



give_item(player, "weapon_deagle")

g_HasDeagle[player] = true



return PLUGIN_HANDLED

}



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))

{

static wname[32]

get_weaponname(weapons, wname, sizeof wname - 1)

engclient_cmd(id, "drop", wname)

}

}

}



stock golden_deagle_zoom( id, type )

{

g_hasZoom[ id ] = true;

switch( type )

{

case 0: cs_set_user_zoom( id, CS_RESET_ZOOM, 1 )

case 1: cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 1 )

case 2:

{

cs_set_user_zoom( id, CS_SET_FIRST_ZOOM, 1 )

emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )

}

case 3:

{

cs_set_user_zoom( id, CS_SET_SECOND_ZOOM, 1 )

emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )

}

case 4:

{

g_ZoomDist[ id ]++

g_hasZoom[ id ] = false;

switch( g_ZoomDist[ id ] )

{

case 1: cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 1 )

case 2:

{

cs_set_user_zoom( id, CS_SET_FIRST_ZOOM, 1 )

emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )

}

case 3:

{

cs_set_user_zoom( id, CS_SET_SECOND_ZOOM, 1 )

emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )

}

case 4:

{

g_ZoomDist[ id ] = 0;

cs_set_user_zoom( id, CS_RESET_ZOOM, 1 )
}
Mohamed null is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-24-2020 , 16:56   Re: Can fix this gold deagle for vips pls !
Reply With Quote #2

1. Put it in php code
2. Give me vip flag
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Mohamed null
BANNED
Join Date: Sep 2020
Location: Algeria
Old 09-24-2020 , 19:01   Ocman What is vip flags ?
Reply With Quote #3

Idk it bro
What is Vip flag ?
Mohamed null is offline
Mohamed null
BANNED
Join Date: Sep 2020
Location: Algeria
Old 09-24-2020 , 19:02   Re: Can fix this gold deagle for vips pls !
Reply With Quote #4

And hox to put it on php code ?
Mohamed null is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-24-2020 , 19:18   Re: Can fix this gold deagle for vips pls !
Reply With Quote #5

Quote:
Originally Posted by Mohamed null View Post
And hox to put it on php code ?
Erorr 404

Put [php] before codes and [/php after codes
Vip flag mean that access you want to give for vips, read This informations and you will understand
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 09-24-2020 at 19:18.
Supremache is offline
Mohamed null
BANNED
Join Date: Sep 2020
Location: Algeria
Old 09-25-2020 , 09:55   Re: Can fix this gold deagle for vips pls !
Reply With Quote #6

m - custom level A (for additional plugins)
n - custom level B
o - custom level C
p - custom level D
q - custom level E
r - custom level F
s - custom level G
t - custom level H
Mohamed null is offline
Reply


Thread Tools
Display Modes

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 15:16.


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