AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Reload Bullet (https://forums.alliedmods.net/showthread.php?t=112896)

MaNuCs 12-21-2009 23:39

Reload Bullet
 
hi have this

PHP Code:

    cs_set_weapon_ammogive_itemid"weapon_deagle" ), )
    
cs_set_user_bpammoidCSW_DEAGLE15 

but i need RELOAD BULLETS 1 for 1

no 7... in one reload...

Ex:

i spawn With 1, I SHOT!!, Reload = 1(no 7), Shot, Reload = 1(no 7), Shot, Reload(no 7) = 1

sorry for my english xD


Thx
+k

AntiBots 12-21-2009 23:41

Re: [ES] Reload Bullet
 
Hook Reload Event and change the weapon ammo.

MaNuCs 12-22-2009 00:08

Re: Reload Bullet
 
whats is the event reload ?

and this??

PHP Code:

public hook(id)
{
cs_set_weapon_ammogive_itemid"weapon_deagle" ), )



ConnorMcLeod 12-22-2009 01:12

Re: Reload Bullet
 
http://forums.alliedmods.net/showthread.php?p=728613

MaNuCs 12-22-2009 02:12

Re: Reload Bullet
 
i dont understending that plugins, i new t.t!

Arkshine 12-22-2009 02:29

Re: Reload Bullet
 
wmc_deagle "1" will set the deagle clip to 1.

MaNuCs 12-22-2009 03:20

Re: Reload Bullet
 
PHP Code:

new bool:Test[33]
public 
plugin_init() 
{
    
register_forward(FM_CmdStart"hook"0
    
RegisterHam(Ham_Spawn"player""Spawn"1)
    
register_clcmd("say /deagle""deagle1")
}

public 
hook(id)
{
    if(
get_user_button(id) && IN_RELOAD && Test[id] == true
    {
    
cs_set_weapon_ammogive_itemid"weapon_deagle" ), )
    }
}  

public 
deagle1(id)
{    
    
    
cs_set_weapon_ammogive_itemid"weapon_deagle" ), )
    
cs_set_user_bpammoidCSW_DEAGLE15 )  
}

public 
Spawn(id)
{
    if (
is_user_alive(id))
    {
    
Test[id] = false
    
}



Doc-Holiday 12-22-2009 04:09

Re: Reload Bullet
 
I dont know how to get the weapon index however since its just one weapon your doing this for...

Get the weapon index from the CSW info page

PHP Code:

#include <amxmodx>
#include <cstrike>

//Not sure what other includes you need
new bool:Test[33];
new 
dglamo;

public 
plugin_init() 
{
    
//Fwd Cmd Start
    
register_forward(FM_CmdStart"FwdCmdStart"0) ;
    
    
//Register Spawn Hook
    
RegisterHam(Ham_Spawn"player""Spawn"1);
    
    
//Deagle Client command
    
register_clcmd("say /deagle""deagle1");
    
register_clcmd("say_team /deagle""deagle1");
    
    
//Deagle Ammo
    
dglamo register_cvar("amx_dglammo""15");
}

public 
FwdCmdStart(iduc_handleseed)
{
    new 
weapon get_user_weapon(id__);
    new 
button get_uc(uc_handleUC_Buttons);
    
    if((
button IN_RELOAD) && Test[id] == true)
    {
        if(
weapon == CSW_DEAGLE)
        {
            
cs_set_weapon_ammo(WeaponIndex1)// Replace Weapon Index with the index of the weapon
        
}
    }
}

public 
deagle1(id)
{    
    new 
dglammo get_pcvar_num(dglamo)
    if(
is_user_alive(id))
    {
        
cs_set_weapon_ammo(WeaponIndex1)// Replace Weapon Index with the index of the weapon
        
cs_set_user_bpammoidCSW_DEAGLEdglammo ); //The bp ammo ammount can be what ever you want it to be.
    
}
}

public 
Spawn(id)
{
    if (
is_user_alive(id))
    {
        
Test[id] = false
    
}



MaNuCs 12-22-2009 05:16

Re: Reload Bullet
 
i dont this :S!!!
i wanna reload 1 bullet...
i shot 1 bullet
i reload again 1 bullet....
.....

Arkshine 12-22-2009 05:30

Re: Reload Bullet
 
...


All times are GMT -4. The time now is 04:10.

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