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:
x = 1000
y = 50
if(random_num(1,x) == 1 && 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
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