Raised This Month: $ Target: $400
 0% 

Any idea why this code doesn't work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 01-23-2013 , 15:17   Re: Any idea why this code doesn't work?
Reply With Quote #7

He didnt said what happens with him version so we cant help him 100%

But i think i know what him problem. He said he want for vips Y+Z and for who isnt vip X+Z
Y= JBPACKS per kill of vips
Z= JBPACKS per HS Kill
X= JBPACKS per kill of normal user

And i think what he says that is wrong is because he thinks this: g_jbpacks[attacker] += get_pcvar_num(g_killhsjp) is JBPACKS NORMAL/VIP + HS but in fact is just HS JBPACKS so what he should make is:

Code:
public fw_player_killed(victim, attacker, shouldgib, id)
{
    if(get_user_team(attacker) == 1 && !(get_user_flags(id) & ADMIN_LEVEL_H))
    {
        g_jbpacks[attacker] += get_pcvar_num(g_killjp) 
        
        if(get_pdata_int(victim, 75) == HIT_HEAD)
        {
            g_jbpacks[attacker] += get_pcvar_num(g_killhsjp)
        }
    }
    
    else if (get_user_team(attacker) == 1 && (get_user_flags(id) & ADMIN_LEVEL_H))
    {
        g_jbpacks[attacker] += get_pcvar_num(g_killjpvip) 
        
        if(get_pdata_int(victim, 75) == HIT_HEAD)
        {
            g_jbpacks[attacker] += get_pcvar_num(g_killhsjpvip)
        }
    }
}
So if player isnt VIP will receive:
- Per kill g_killjp
- Per HS g_killhsjp

And if player is VIP will receive:
- Per kill g_killjpvip
- Per HS g_killhsjpvip

So if you want normal jp amount 10, you set g_killjp to 10, and if want hs 15 you set g_killhsjp to 15 and normal user will receive 15 jp per hs. Same thing to vip cvars
Note: dont forget add the cvar g_killhsjpvip because that is wasnt on your code.

And on your code, you had it changed, you had user get vip amount and vip get user amount, so use the version of this post ;)
__________________

Last edited by Jhob94; 01-23-2013 at 15:41. Reason: adding code
Jhob94 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 20:39.


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