AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Help / Support [Req] Zpa fw_PlayerKilled Bugs (https://forums.alliedmods.net/showthread.php?t=228591)

plazma 10-23-2013 03:16

[Req] Zpa fw_PlayerKilled Bugs
 
Can someone fix it... :cry:

https://forums.alliedmods.net/showpo...&postcount=683

yokomo 10-23-2013 06:03

Re: [Req] Zpa fw_PlayerKilled Bugs
 
Quote:

Originally Posted by plazma (Post 2052013)

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.

plazma 10-23-2013 14:38

Re: [Req] Zpa fw_PlayerKilled Bugs
 
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

???

yokomo 10-23-2013 15:33

Re: [Req] Zpa fw_PlayerKilled Bugs
 
Quote:

Originally Posted by plazma (Post 2052200)
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


plazma 10-25-2013 11:05

Re: [Req] Zpa fw_PlayerKilled Bugs
 
thanks alot it fix no error no bugs :P

WaLkMaN 10-31-2013 15:41

Re: [Req] Zpa fw_PlayerKilled Bugs
 
Quote:

Originally Posted by yokomo (Post 2052214)
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()
        }
    } 


tfk94 03-08-2016 16:16

Re: [Req] Zpa fw_PlayerKilled Bugs
 
can someone help me
i changed the code with the one walkman has give but i get
loose indentation on 2518 and 2570 line

Chihuahuax 03-09-2016 01:42

Re: [Req] Zpa fw_PlayerKilled Bugs
 
It doesnt matter

tfk94 03-09-2016 05:04

Re: [Req] Zpa fw_PlayerKilled Bugs
 
isn't that a error as well ?

Chihuahuax 03-09-2016 07:16

Re: [Req] Zpa fw_PlayerKilled Bugs
 
Quote:

Originally Posted by Wilson [29th ID] (Post 363740)
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.



All times are GMT -4. The time now is 09:18.

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