Raised This Month: $ Target: $400
 0% 

Help / Support [Req] Zpa fw_PlayerKilled Bugs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
plazma
Senior Member
Join Date: Oct 2013
Old 10-23-2013 , 03:16   [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #1

Can someone fix it...

https://forums.alliedmods.net/showpo...&postcount=683
plazma is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-23-2013 , 06:03   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #2

Quote:
Originally Posted by plazma View Post
Code:
if (g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore))   SetHamParamInteger(3, 2)
Change to:
Code:
if (is_user_connected(attacker) && g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore))   SetHamParamInteger(3, 2)
You should check is attacker valid.

Last edited by yokomo; 10-23-2013 at 06:04.
yokomo is offline
plazma
Senior Member
Join Date: Oct 2013
Old 10-23-2013 , 14:38   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #3

and I have this:

PHP Code:
    // Nemesis and Assassin explode! or when killed by a Assassin victim is cut in pieces
    
if (g_nemesis[victim] || g_assassin[victim] || (g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore)))
        
SetHamParamInteger(32
???

Last edited by plazma; 10-23-2013 at 14:40.
plazma is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-23-2013 , 15:33   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #4

Quote:
Originally Posted by plazma View Post
and I have this:

PHP Code:
    // Nemesis and Assassin explode! or when killed by a Assassin victim is cut in pieces
    
if (g_nemesis[victim] || g_assassin[victim] || (g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore)))
        
SetHamParamInteger(32
???
PHP Code:
    // Nemesis and Assassin explode! or when killed by a Assassin victim is cut in pieces
    
if (g_nemesis[victim] || g_assassin[victim] || (is_user_connected(attacker) && g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore)))
        
SetHamParamInteger(32
yokomo is offline
plazma
Senior Member
Join Date: Oct 2013
Old 10-25-2013 , 11:05   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #5

thanks alot it fix no error no bugs
plazma is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 10-31-2013 , 15:41   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #6

Quote:
Originally Posted by yokomo View Post
PHP Code:
    // Nemesis and Assassin explode! or when killed by a Assassin victim is cut in pieces
    
if (g_nemesis[victim] || g_assassin[victim] || (is_user_connected(attacker) && g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore)))
        
SetHamParamInteger(32
Or just

PHP Code:
// Nemesis and Assassin explode!
    
if (g_nemesis[victim] || g_assassin[victim])
        
SetHamParamInteger(32)
    
    
// Get deathmatch mode status and whether the player killed himself
    
static selfkill
    selfkill 
= (victim == attacker || !is_user_valid_connected(attacker)) ? true false
    
    
// Make sure that the player was not killed by a non-player entity or through self killing
    
if (!selfkill)
    {
        
// Ignore Nemesis/Survivor/Sniper Frags?
        
if ((g_nemesis[attacker] && get_pcvar_num(cvar_nemignorefrags)) || (g_survivor[attacker] && get_pcvar_num(cvar_survignorefrags)) 
        || (
g_sniper[attacker] && get_pcvar_num(cvar_sniperignorefrags))|| (g_assassin[attacker] && get_pcvar_num(cvar_assassinignorefrags)))
            
RemoveFrags(attackervictim)
        
        
// Zombie/nemesis/assassin killed human, reward ammo packs
        
if (g_zombie[attacker] && (!g_nemesis[attacker] || !get_pcvar_num(cvar_nemignoreammo)) && (!g_assassin[attacker] || !get_pcvar_num(cvar_assassinignoreammo)))
            
g_ammopacks[attacker] += get_pcvar_num(cvar_ammoinfect)
        
        
// Human killed zombie, add up the extra frags for kill
        
if (!g_zombie[attacker] && get_pcvar_num(cvar_fragskill) > 1)
            
UpdateFrags(attackervictimget_pcvar_num(cvar_fragskill) - 100)
        
        
// Zombie killed human, add up the extra frags for kill
        
if (g_zombie[attacker] && get_pcvar_num(cvar_fragsinfect) > 1)
            
UpdateFrags(attackervictimget_pcvar_num(cvar_fragsinfect) - 100)
        
        
//When killed by a Assassin victim is cut in pieces
        
if (g_assassin[attacker] && get_pcvar_num(cvar_nemfraggore))    
            
SetHamParamInteger(32)
        
        
// When killed by a Sniper victim explodes
        
if (g_sniper[attacker] && (g_currentweapon[attacker] == CSW_AWP) && get_pcvar_num(cvar_sniperfraggore) && g_zombie[victim])
        {    
            
// Cut him into pieces
            
SetHamParamInteger(32)
            
            
// Get his origin
            
static origin[3]
            
get_user_origin(victimorigin)
            
            
// Make some blood in the air
            
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
            
write_byte(TE_LAVASPLASH// TE id
            
write_coord(origin[0]) // origin x
            
write_coord(origin[1]) // origin y
            
write_coord(origin[2] - 26// origin z
            
message_end()
        }
    } 
WaLkMaN is offline
tfk94
Veteran Member
Join Date: Jan 2011
Location: [url=http://www.gametrac
Old 03-08-2016 , 16:16   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #7

can someone help me
i changed the code with the one walkman has give but i get
loose indentation on 2518 and 2570 line
tfk94 is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 03-09-2016 , 01:42   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #8

It doesnt matter
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
tfk94
Veteran Member
Join Date: Jan 2011
Location: [url=http://www.gametrac
Old 03-09-2016 , 05:04   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #9

isn't that a error as well ?
tfk94 is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 03-09-2016 , 07:16   Re: [Req] Zpa fw_PlayerKilled Bugs
Reply With Quote #10

Quote:
Originally Posted by Wilson [29th ID] View Post
Loose Indentation is when you don't have your code set up into "paragraphs" correctly. It is not an error; it is a warning - usually it means you overlooked something.

For example, right after the Speler informatie ophalen. comment, you have a loop that does not have a closing } bracket afterward, but instead you have an SQL statement below it. If that is part of the loop itself, hit tab on those lines until it lines up with the get_user_team stuff. Otherwise, get that closing bracket above it.

Last edited by Chihuahuax; 03-09-2016 at 07:17.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
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 17:31.


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