Raised This Month: $ Target: $400
 0% 

2 little problems


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 03-23-2011 , 18:02   Re: 2 little problems
Reply With Quote #4

Quote:
Originally Posted by georgik57 View Post
problem 2: still getting a tag mismatch error. i think it has to be in the format of the other 2 conditions
post me the line

problem 1:
PHP Code:
// User got primary weapons forward
public zpnm_user_got_weapons1_post(id)
{
    
// Find out what human class our player is using
    
switch (zpnm_get_user_human_class(id))
    {
        case 
g_hclass_desert// Desert Human gets more fire grenades
        
{
            
FireNades[id] = get_pcvar_num(cvar_desert_nades)
            
give_grenades(id0FireNades[id])
        }
        case 
g_hclass_arctic// Arctic Human gets more frost grenades
        
{
            
FrostNades[id] = get_pcvar_num(cvar_arctic_nades)
            
give_grenades(id1FrostNades[id])
        }
        case 
g_hclass_urban// Urban Human gets more light grenades
        
{
            
LightNades[id] = get_pcvar_num(cvar_urban_nades)
            
give_grenades(id2LightNades[id])
        }
    }
}

give_grenades(idiNadeTypeiCount)
{
    if (!
iCount) return;
    
    static const 
iAmmoIDs[] = { 121113 }
    static const 
iWeaponIDs[] = { CSW_HEGRENADECSW_FLASHBANGCSW_SMOKEGRENADE }
    static const 
szNames[][] = { "weapon_hegrenade""weapon_flashbang""weapon_smokegrenade" }
    
    if (
iCount >= 2)
    {
        if (!
user_has_weapon(idiWeaponIDs[iNadeType]))
        {
            
give_item(idszNames[iNadeType])
            
iCount -= 1
        
}
        
        
cs_set_user_bpammo(idiWeaponIDs[iNadeType], cs_get_user_bpammo(idiWeaponIDs[iNadeType]) + iCount)
        
        static 
msgAmmoPickup
        
if (msgAmmoPickup || (msgAmmoPickup get_user_msgid("AmmoPickup")))
        {
            
message_begin(MSG_ONE_UNRELIABLEmsgAmmoPickup_id)
            
write_byte(iAmmoIDs[iNadeType])
            
write_byte(iCount)
            
message_end()
        }
        
        
emit_sound(idCHAN_ITEMg_szAmmoPickupSound1.0ATTN_NORM0PITCH_NORM)
    }
    else
    {
        
give_item(idszNames[iNadeType])
    }

__________________

Working on:
nothing

Last edited by schmurgel1983; 03-24-2011 at 01:51.
schmurgel1983 is offline
 



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 14:40.


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