Raised This Month: $51 Target: $400
 12% 

[TUT] How to make Golden weapons.


Post New Thread Reply   
 
Thread Tools Display Modes
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-03-2011 , 02:14   Re: [TUT] How to make Golden weapons.
Reply With Quote #21

Quote:
Originally Posted by meTaLiCroSS View Post
Not funny, then will warn these 200% useless posts.
Yeah Like that and my post

Quote:
Originally Posted by albert123 View Post
Yeah, i bored of seeing them..
.Dare Devil. is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-03-2011 , 11:46   Re: [TUT] How to make Golden weapons.
Reply With Quote #22

Quote:
Originally Posted by meTaLiCroSS View Post
Not funny, then will warn these 200% useless posts.
Quote:
Originally Posted by meTaLiCroSS View Post
Ok Mr.Pro
xDDD
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Old 03-05-2011, 04:18
MilisyaTechlo
This message has been deleted by MilisyaTechlo. Reason: Ok Mr.Pro is not funny and suck
gancalo
Junior Member
Join Date: Feb 2012
Location: Lisboa
Old 03-18-2012 , 07:25   Re: [TUT] How to make Golden weapons.
Reply With Quote #23

can someone please by this code for normal server
as the "golden ak 47" over the color of the bullets are blue '? plz


gancalo is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 03-18-2012 , 08:01   Re: [TUT] How to make Golden weapons.
Reply With Quote #24

Quote:
Originally Posted by gancalo View Post
can someone please by this code for normal server
as the "golden ak 47" over the color of the bullets are blue '? plz


Just change
Code:
   write_byte( 255 )     // r, g, b
   write_byte( 215 )       // r, g, b
   write_byte( 0 )       // r, g, b
__________________
H.RED.ZONE is offline
AmineKyo
فوق سريرك
Join Date: Oct 2011
Location: Morocco
Old 03-18-2012 , 09:07   Re: [TUT] How to make Golden weapons.
Reply With Quote #25

Quote:
Originally Posted by gancalo View Post
can someone please by this code for normal server
as the "golden ak 47" over the color of the bullets are blue '? plz


Already exist for normal mod just search and edit
__________________
AmineKyo is offline
gancalo
Junior Member
Join Date: Feb 2012
Location: Lisboa
Old 03-18-2012 , 09:33   Re: [TUT] How to make Golden weapons.
Reply With Quote #26

H.RED.ZONE help me

I want it for a "water gun" and wanted her to have all the sounds
I tried to change them. "I changed the name of mdl's on .sma" but then the sound changes to the sound of the AK47 so is the sound of "reloading" Can you help me?
l have v_water.mdl p_water.mdl
sounds "water_clipin; water_clipout; water_draw; water_pump; water-1"
working "water_pump" reloading and this "water_pump"
And the shot does not work "water-1"

Anyone know why?

is somehow easier to add new weapons to a normal server?


MY CODE CHANGED BY MI


PHP Code:
/* AMX Mod script

* (c) 2009, AlejandroSk
* This file is provided as is (no warranties).
*
*/



#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>


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

new AK_V_MODEL[64] = "models/v_water.mdl"
new AK_P_MODEL[64] = "models/p_water.mdl"

/* Pcvars */
new cvar_dmgmultipliercvar_goldbullets,  cvar_custommodelcvar_uclipcvar_cost

new bool:g_HasAk[33]

new 
g_hasZoom33 ]
new 
bullets33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

public 
plugin_init()
{
    
    
/* CVARS */
    
cvar_dmgmultiplier register_cvar("water_dmg_multiplier""2")
    
cvar_custommodel register_cvar("water_custom_model""1")
    
cvar_goldbullets register_cvar("water_blue_bullets""1")
    
cvar_uclip register_cvar("water_unlimited_clip""0")
    
cvar_cost register_cvar("water_cost""6000")
    
    
// Register The Buy Cmd
    
register_clcmd("say water""CmdBuyAk")
    
register_clcmd("say_team water""CmdBuyAk")
    
register_concmd("amx_water""CmdGiveAk"ADMIN_BAN"<name>")
    
    
// Register The Plugin
    
register_plugin("water""1.0""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_forwardFM_CmdStart"fw_CmdStart" )
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
}

public 
client_connect(id)
{
    
g_HasAk[id] = false
}

public 
client_disconnect(id)
{
    
g_HasAk[id] = false
}

public 
Death()
{
    
g_HasAk[read_data(2)] = false
}

public 
fwHamPlayerSpawnPost(id)
{
    
g_HasAk[id] = false
}

public 
plugin_precache()
{
    
precache_model(AK_V_MODEL)
    
precache_model(AK_P_MODEL)
    
m_spriteTexture precache_model("sprites/dot.spr")
    
precache_sound("weapons/zoom.wav")
}

public 
checkModel(id)
{
    if ( !
g_HasAk[id] )
        return 
PLUGIN_HANDLED
    
    
new szWeapID read_data(2)
    
    if ( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
    {
        
set_pev(idpev_viewmodel2AK_V_MODEL)
        
set_pev(idpev_weaponmodel2AK_P_MODEL)
    }
    return 
PLUGIN_HANDLED
}

public 
checkWeapon(id)
{
    new 
plrClipplrAmmoplrWeap[32]
    new 
plrWeapId
    
    plrWeapId 
get_user_weapon(idplrClip plrAmmo)
    
    if (
plrWeapId == CSW_AK47 && g_HasAk[id])
    {
        
checkModel(id)
    }
    else 
    {
        return 
PLUGIN_CONTINUE
    
}
    
    if (
plrClip == && get_pcvar_num(cvar_uclip))
    {
        
// If the user is out of ammo..
        
get_weaponname(plrWeapIdplrWeap31)
        
// Get the name of their weapon
        
give_item(idplrWeap)
        
engclient_cmd(idplrWeap
        
engclient_cmd(idplrWeap)
        
engclient_cmd(idplrWeap)
    }
    return 
PLUGIN_HANDLED
}



public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )
    {
        
SetHamParamFloat(4damage get_pcvar_floatcvar_dmgmultiplier ) )
    }
}

public 
fw_CmdStartiduc_handleseed )
{
    if( !
is_user_aliveid ) ) 
        return 
PLUGIN_HANDLED
    
    
if( ( get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new 
szClipszAmmo
        
new szWeapID get_user_weaponidszClipszAmmo )
        
        if( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
        {
            
g_hasZoom[id] = true
            cs_set_user_zoom
idCS_SET_AUGSG552_ZOOM)
            
emit_soundidCHAN_ITEM"weapons/zoom.wav"0.202.400100 )
        }
        
        else if ( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && g_hasZoom[id])
        {
            
g_hasZoomid ] = false
            cs_set_user_zoom
idCS_RESET_ZOOM)
            
        }
        
    }
    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(idpteam15)
        
        if ((
bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id]) 
        {
            new 
vec1[3], vec2[3]
            
get_user_origin(idvec11// origin; your camera point.
            
get_user_origin(idvec24// termina; where your bullet goes (4 is cs-only)
            
            
            //BEAMENTPOINTS
            
message_beginMSG_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_shortm_spriteTexture )
            
write_byte(1// framestart
            
write_byte(5// framerate
            
write_byte(2// life
            
write_byte(10// width
            
write_byte(0// noise
            
write_byte255 )     // r, g, b
            
write_byte215 )       // r, g, b
            
write_byte)       // r, g, b
            
write_byte(200// brightness
            
write_byte(150// speed
            
message_end()
        }
        
        
bullets[id] = clip
    
}
    
}

public 
CmdBuyAk(id)
{
    if ( !
is_user_alive(id) )
    {
        
client_print(id,print_chat"[AMXX] To buy golden Ak 47 You need to be alive!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
money cs_get_user_money(id)
    
    if (
money >= get_pcvar_num(cvar_cost))
    {
        
cs_set_user_money(idmoney get_pcvar_num(cvar_cost))
        
give_item(id"weapon_ak47")
        
g_HasAk[id] = true
    
}
    
    else
    {
        
client_print(idprint_chat"[AMXX] You dont hav enough money to buy Golden Ak 47. Cost $%d "get_pcvar_num(cvar_cost))
    }
    return 
PLUGIN_HANDLED
}

public 
CmdGiveAk(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_water")
    
g_HasAk[player] = true
    
    
return PLUGIN_HANDLED
}

stock drop_prim(id
{
    new 
weapons[32], num
    get_user_weapons
(idweaponsnum)
    for (new 
0numi++) {
        if (
Wep_ak47 & (1<<weapons[i])) 
        {
            static 
wname[32]
            
get_weaponname(weapons[i], wnamesizeof 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 }
*/ 
gancalo is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 03-18-2012 , 09:42   Re: [TUT] How to make Golden weapons.
Reply With Quote #27

PHP Code:
give_item(player"weapon_water"
sir, you're wrong. The second parameter should only be the weapon variable that are exist in CS.

[EDIT]

You can't replace sound, but you only do it on knife.
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.

Last edited by JoKeR LauGh; 03-18-2012 at 09:44.
JoKeR LauGh is offline
gancalo
Junior Member
Join Date: Feb 2012
Location: Lisboa
Old 03-18-2012 , 10:07   Re: [TUT] How to make Golden weapons.
Reply With Quote #28

Quote:
Originally Posted by JoKeR LauGh View Post
PHP Code:
give_item(player"weapon_water"
sir, you're wrong. The second parameter should only be the weapon variable that are exist in CS.

[EDIT]

You can't replace sound, but you only do it on knife.
this is not bad ...... only have to create a variable w_water
but if I change to ak47 is normal ..... but when the round ends ak47 the gun back to normal
so i created another w_water.mdl
works normal until that point just wanted to change the color of the bullets and the sounds
gancalo is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 03-18-2012 , 10:11   Re: [TUT] How to make Golden weapons.
Reply With Quote #29

For sound code look at the flamethrower or salamander. (some weapon that does not use normal sounds)

For color change that what i told you.
__________________
H.RED.ZONE is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 03-18-2012 , 11:55   Re: [TUT] How to make Golden weapons.
Reply With Quote #30

Quote:
Originally Posted by gancalo View Post
this is not bad ...... only have to create a variable w_water
but if I change to ak47 is normal ..... but when the round ends ak47 the gun back to normal
so i created another w_water.mdl
works normal until that point just wanted to change the color of the bullets and the sounds
o.o???????
I doesn't say it was bad, I just said you was wrong.
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh 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 03:30.


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