Raised This Month: $ Target: $400
 0% 

Fix one small xp bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 01-01-2010 , 14:19   Fix one small xp bug
Reply With Quote #1

if player is commit suicide this get xp. Why is this bug ?? and what i can fix it ?? plz help
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-01-2010 , 14:25   Re: Fix one small xp bug
Reply With Quote #2

Post all your plugins, will see. =D
__________________
xPaw is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 01-01-2010 , 15:06   Re: Fix one small xp bug
Reply With Quote #3

Code:
if( killer == victim ) return; //suicide :o
matsi is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 01-01-2010 , 16:20   Re: Fix one small xp bug
Reply With Quote #4

or if(!killer) ...
__________________
I am out of order!
grimvh2 is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 01-01-2010 , 16:44   Re: Fix one small xp bug
Reply With Quote #5

i using this:
PHP Code:
if (g_attacker != g_victim
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 01-03-2010 , 04:00   Re: Fix one small xp bug
Reply With Quote #6

who can help me ???!
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-03-2010 , 04:06   Re: Fix one small xp bug
Reply With Quote #7

Quote:
Originally Posted by ~Ice*shOt View Post
who can help me ???!

Show us your code and we will help ya.
Doc-Holiday is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 01-03-2010 , 06:08   Re: Fix one small xp bug
Reply With Quote #8

I say i using this:

if (g_attacker != g_victim)
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 01-03-2010 , 06:25   Re: Fix one small xp bug
Reply With Quote #9

Just give us the whole code, if you don't want to then don't ask for help.
__________________
I am out of order!
grimvh2 is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 01-03-2010 , 09:42   Re: Fix one small xp bug
Reply With Quote #10

i can post:
PHP Code:
public Ev_DeathMsg()
{
    new 
g_attacker read_data(1)
    new 
g_victim read_data(2)

    if (
g_attacker != g_victim)
    {
        new 
XPGain
        
if (PlayerLevel[g_attacker] < 1)
        {
            
XPGain get_pcvar_num(xp_per_kill)
        }

        else 
        {
            
XPGain get_pcvar_num(xp_per_kill) * PlayerLevel[g_attacker]
        }
        
set_hudmessage(2550500.500.3312.02.0)
        
show_hudmessage(g_attacker"+%i Experience For Kill!"XPGain)
        
PlayerXP[g_attacker] += XPGain
    
}

    if (
get_user_team(g_attacker) == 2)
    {
        
PlayerZombieDeaths[g_victim] += 1
        PlayerZombieKills
[g_attacker] += 1
    
}

    if (
get_user_team(g_attacker) == 1)
    {
        
PlayerHumanDeaths[g_victim] += 1
        PlayerHumanKills
[g_attacker] += 1
    
}
    
LevelUP(g_attacker)

~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Reply


Thread Tools
Display Modes

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 04:06.


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