Raised This Month: $ Target: $400
 0% 

Displaying call stack trace for plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kikal767
Member
Join Date: Aug 2012
Old 10-23-2012 , 05:41   Re: Displaying call stack trace for plugin
Reply With Quote #6

Thanks all....

like this ?
PHP Code:
if((GetClientTeam(target) == 2) && (StrEqual(weapon"jockey_claw")) && (GetClientTeam(Jockey) == 3) && Jockey && Jockey <= MaxClients && IsClientInGame(Jockey)) 
OR like this
PHP Code:
if((GetClientTeam(target) == 2) && (StrEqual(weapon,  "jockey_claw")) && (GetClientTeam(Jockey) == 3)  &&  IsClientInGame(Jockey)) 
And thanks GsiX

Is the core like this?

PHP Code:
public Action:Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
Jockey GetClientOfUserId(GetEventInt(event"attacker"));
    new 
target GetClientOfUserId(GetEventInt(event"userid"));

    
decl String:weapon[64];
    
GetEventString(event"weapon"weaponsizeof(weapon));
    
    if((
GetClientTeam(target) == 2) && (StrEqual(weapon"jockey_claw")) && (GetClientTeam(Jockey) == 3) && IsClientInGame(Jockey))
    {
        new 
Jockey_Victim GetEntPropEnt(JockeyProp_Send"m_jockeyVictim");
        if (
IsValidEntity(Jockey_Victim) && Jockey_Victim != 0)
        {
            return 
Plugin_Continue;
        } else
        {
            new 
duration GetConVarInt(FindConVar("sm_Jockey_acidswipe_duration"));
            new 
stack GetConVarInt(FindConVar("sm_Jockey_acidswipe_stack"));
            
            
attacker[target] = Jockey;
            if(
hurtsLeft[target] <= 0)
            {
                
hurtsLeft[target] = duration;
                
CreateTimer(1.0Acid_Damagetarget);
            } else
            {
                if(
stack == -1)
                {
                    
hurtsLeft[target] = duration;
                } else
                {
                    if(
stack >= 0)
                    {
                        
hurtsLeft[target] += stack;
                    } else
                    {
                        
//sm_Jockey_acidswipe_stack has invalid value so log error
                        
LogError("sm_Jockey_acidswipe_stack has an invalid value. Accepted values are -1 and higher.");
                    }
                }
            }
        }
    }
    return 
Plugin_Continue;


Last edited by kikal767; 10-23-2012 at 06:10.
kikal767 is offline
 



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 11:43.


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