Raised This Month: $51 Target: $400
 12% 

fw_PlayerKilled and selfkill problem.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
johnny40409
Senior Member
Join Date: Mar 2009
Old 05-29-2009 , 08:17   fw_PlayerKilled and selfkill problem.
Reply With Quote #1

PHP Code:
public fw_PlayerKilled(victimattackershouldgib) {
 static 
selfkill
 selfkill 
= (victim == attacker || !is_user_valid_connected(attacker)) ? true false
 
if (selfkill) {
  return;
 }
 if ( 
attacker )
  
g_paintpacks[attacker] += get_pcvar_num(g_killreward)


when I kill my self , it will block adding the paintpacks <-- thats right..

but when I kill somebody , the paintpacks wont add..
where's the problem of the code?
johnny40409 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-29-2009 , 08:37   Re: fw_PlayerKilled and selfkill problem.
Reply With Quote #2

Try this one.
PHP Code:
public fw_PlayerKillediVictimiAttackershouldgib ) {
    if( 
iVictim != iAttacker && is_user_connectediAttacker ) )
        
g_paintpacksiAttacker ] += get_pcvar_numg_killreward );

__________________
xPaw is offline
Reply



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


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