AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   FrontLine plugin (https://forums.alliedmods.net/showthread.php?t=334558)

RavensBro 10-03-2021 20:40

FrontLine plugin
 
1 Attachment(s)
could someone take a look at this plugin and fix it for me? i run a frontline server but this plugin is not working like it should get errors. thanks for taking a look and fixing it if you do :bacon!:

MAGNAT2645 10-05-2021 09:58

Re: FrontLine plugin
 
Just add a check before GetEntityClassname (line 437)
Like this:
Code:

    new iWeaponEnt = GetEntPropEnt(attacker, Prop_Send, "m_hActiveWeapon");
    if (iWeaponEnt != -1 && IsValidEntity(iWeaponEnt)) {
        GetEntityClassname(iWeaponEnt, szClassName, sizeof(szClassName));
        if (StrEqual(szClassName, "tf_weapon_knife") && (damagetype & DMG_CRIT == DMG_CRIT))
        {
            //Backstab detected.
            if (IsPlayerInTank[victim]){
                damage = 200.0;
                action = Plugin_Changed;
            }
        }
        if (IsPlayerInTank[attacker] && (damagetype & DMG_CRIT == DMG_CRIT)){
            if (Supercrits[attacker]){
                damage = damage * 2.5;
                action = Plugin_Changed;
            }
        }
        if (IsPlayerInTank[victim] && !IsPlayerInTank[attacker]){
            if (Supercrits[victim] && !(damagetype & TF_DMG_MELEE == TF_DMG_MELEE)){
                damage = damage * 0.55;
                action = Plugin_Changed;
            }
            if (FiresHeavyLasers[victim] && GetClientHealth(victim) >= 2000){
                damage = damage * 0.75;
                action = Plugin_Changed;
            }
            if (InvisiTank[victim] && damage >= 200.0){
                if (TF2_IsPlayerInCondition(victim, TFCond:110)){
                    TF2_RemoveCondition(victim, TFCond:110);
                }
            }
        }
    }
       
       
    return action;


RavensBro 10-05-2021 10:31

Re: FrontLine plugin
 
thank you i will let you know if that works :)

RavensBro 10-05-2021 11:09

Re: FrontLine plugin
 
1 Attachment(s)
now i get these errors

L 10/05/2021 - 09:58:23: [SM] Exception reported: Client index 418 is invalid
L 10/05/2021 - 09:58:23: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:23: [SM] Call stack trace:
L 10/05/2021 - 09:58:23: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:23: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:23: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 09:58:23: [SM] Exception reported: Client index 504 is invalid
L 10/05/2021 - 09:58:23: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:23: [SM] Call stack trace:
L 10/05/2021 - 09:58:23: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:23: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:23: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 09:58:30: [SM] Exception reported: Client index 418 is invalid
L 10/05/2021 - 09:58:30: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:30: [SM] Call stack trace:
L 10/05/2021 - 09:58:30: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:30: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:30: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 09:58:33: [SM] Exception reported: Client index 418 is invalid
L 10/05/2021 - 09:58:33: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:33: [SM] Call stack trace:
L 10/05/2021 - 09:58:33: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:33: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:33: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 09:58:40: [SM] Exception reported: Client index 504 is invalid
L 10/05/2021 - 09:58:40: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:40: [SM] Call stack trace:
L 10/05/2021 - 09:58:40: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:40: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:40: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 09:58:43: [SM] Exception reported: Client index 504 is invalid
L 10/05/2021 - 09:58:43: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:43: [SM] Call stack trace:
L 10/05/2021 - 09:58:43: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:43: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:43: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 09:58:46: [SM] Exception reported: Client index 504 is invalid
L 10/05/2021 - 09:58:46: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 09:58:46: [SM] Call stack trace:
L 10/05/2021 - 09:58:46: [SM] [0] IsClientInGame
L 10/05/2021 - 09:58:46: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 09:58:46: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned
L 10/05/2021 - 10:05:32: [SM] Exception reported: Client index 89 is invalid
L 10/05/2021 - 10:05:32: [SM] Blaming: frontlinemod.smx
L 10/05/2021 - 10:05:32: [SM] Call stack trace:
L 10/05/2021 - 10:05:32: [SM] [0] IsClientInGame
L 10/05/2021 - 10:05:32: [SM] [1] Line 73, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\includ e\tobias_stocks.inc::GetClientSlot
L 10/05/2021 - 10:05:32: [SM] [2] Line 271, C:\Users\RavensBrp\Desktop\source mod and meta mod\sourcemod-1.9.0-git6232-windows-ADMIN_STORE\addons\sourcemod\scripting\frontl inemod.sp::OnProjectileSpawned


All times are GMT -4. The time now is 20:55.

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