AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   fw_PlayerKilled and selfkill problem. (https://forums.alliedmods.net/showthread.php?t=93463)

johnny40409 05-29-2009 08:17

fw_PlayerKilled and selfkill problem.
 
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?

xPaw 05-29-2009 08:37

Re: fw_PlayerKilled and selfkill problem.
 
Try this one.
PHP Code:

public fw_PlayerKillediVictimiAttackershouldgib ) {
    if( 
iVictim != iAttacker && is_user_connectediAttacker ) )
        
g_paintpacksiAttacker ] += get_pcvar_numg_killreward );




All times are GMT -4. The time now is 13:54.

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