AvaMods 5.o Forums (https://forums.avamods.com/)
-   Server / Mod Support (https://forums.avamods.com/server-mod-support/)
-   -   Weapon Jam.. (https://forums.avamods.com/server-mod-support/1494-weapon-jam.html)

diamond-optic February 1st, 2008 07:07 PM

and obviously auto's will jam more often just due to the number of shots fired

a basic explantion of how jamming works:

PHP Code:

1000
50

if(random_num(1,x) == && is_clip_notfull)
     {
     if(
random_num(1,y) == 1)
           
//perm jam
     
else
           
//normal jam
     


obviously thats not exactly how its coded in pawn and theres more to it then that.. but thats basically it for simple minded ppl


and to confuse you more.. heres the actual code from the CurWeapon function forward that does the actual jamming:
PHP Code:

    if(get_pcvar_num(p_plugin) && is_user_alive(id) && is_user_connected(id) && !is_user_bot(id))
        {
        new 
wpnid dod_get_weapon_ent(id)
        new 
is_jammed pev(wpnid,pev_iuser4)
        
        if(
wpnid && pev_valid(wpnid))
            {
            
set_pev(wpnid,pev_iuser3,0)
            
            if(
is_jammed)
                
set_pdata_float(wpnid,OFFSET_WPN_PROF,100.0,OFFSET_LINUX)    
            else if(
is_clip_notfull(id))
                {
                if(
random_num(1,get_pcvar_num(p_chance)) == 1)
                    {
                    new 
perm get_pcvar_num(p_perm)
                    
                    if(
perm && random_num(1,perm) == 1)
                        
set_pev(wpnid,pev_iuser4,2)
                    else
                        
set_pev(wpnid,pev_iuser4,1)
                    }
                }
            }    
        } 

and every weapon can jam except nades/rockets/melee.. tho there is a chance that occasionally if you switch weapons at the exact right time as your gun is jamming that it will still fire off the forward but when it gets the wpn entity id you have the new weapon out and it picks up that.. but that should be very very rare



and..
Quote:

Originally Posted by BuLLeT (Post 14087)
the Tommy gun jammed on me again the other day with the first shot...

whats your point.. you fired a shot and it jammed.. it didnt start off jammed, im positive of that.. next time maybe you should clean your weapon better and/or load the magazine properly :P

The Punisher February 1st, 2008 07:17 PM

oh now i get it....



but still hate it. lol

timmy! February 8th, 2008 11:34 AM

A grenade jam would be awesome "Your arm has cramped up, hit use to drop grenade" :P

The Punisher February 8th, 2008 03:13 PM

NO.

BuLLeT February 8th, 2008 03:35 PM

If that shit happens imma quit dod in general

The Punisher February 8th, 2008 04:23 PM

im with ya.

buck_futter February 8th, 2008 04:36 PM

Quote:

Originally Posted by timmy! (Post 14337)
A grenade jam would be awesome "Your arm has cramped up, hit use to drop grenade" :P

nvm theres no yawning smilie

BuLLeT February 8th, 2008 04:59 PM

make the walls wallable again then i wont care

diamond-optic February 8th, 2008 06:07 PM

lol your a noob cause there isnt a single thing done to walls (except like the front of the red room)

The Punisher February 9th, 2008 12:15 PM

I knew it....if your lookin at it and its blown up the wall on the left cant be walled only in one spot.

i hate it. lol


All times are GMT -4. The time now is 12:58 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.

2005-2006  team cdrive 
2006-2007 AvaMods 0.x
2007-2008 AvaMods 1.x
2008-2012 AvaMods 2.x
2013-2014 AvaMods 3.o
2014-2016 AvaMods 4.o
2016-2025 AvaMods 5.o