Raised This Month: $32 Target: $400
 8% 

[L4D] Left 4 Dragokas | API


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
6914
Plugin Version:
0.6
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Some stocks required for my other plugins
    Old 01-21-2020 , 13:43   [L4D] Left 4 Dragokas | API
    Reply With Quote #1

    Plugin does nothing, but firing forward for 3rd party plugins.

    It is required by some of my other plugins as a dependency.
    You can freely use it in your plugins as well.

    INC-file can be used stand-alone or in pair with sp (depending on whether you need forwards).

    Forwards:

    - OnDoorUsed
    - OnTankCountChanged
    - OnTankCountSpawnedPerRoundChanged

    Spoiler

    Stocks:

    PHP Code:
    stock bool IsPlayerIncapped(int client)
    stock bool IsClientRootAdmin(int client)
    stock bool IsPlayerPinned(int client)
    stock int GetPwnInfected(int client)
    stock void ForcePanicEvent(int client)
    stock int SpawnInfectedAt(float position[3], char[] sClass)
    stock bool IsCommonInfected(int entity)
    stock bool IsSurvivor(int client)
    stock bool IsWitch(int iEntity)
    stock int GetCommonsCount()
    stock void Chase(int target)
    stock bool IsTank(int client)
    stock bool IsBoomer(int client)
    stock bool IsSmoker(int client)
    stock bool IsHunter(int client)
    stock bool IsCharger(int client)
    stock bool IsJockey(int client)
    stock bool IsSpitter(int client)
    stock bool IsValidEntRef(int entity
    Installation:

    a) if required left4dragokas.smx:
    - copy smx file to addons/sourcemod/plugins/
    b) if required left4dragokas.inc for compilation other plugin:
    - copy inc file to local compiler's folder addons/sourcemod/scripting/include
    (or to appropriate window of online compiler)
    P.S.:
    - It's my private plugin written for myself and my Bloody Witch team.
    - Project and updates discontinued. Don't ask.
    Attached Files
    File Type: zip left4dragokas.zip (11.5 KB, 344 views)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 08-12-2023 at 13:10.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 01-31-2020 , 10:33   Re: [inc] Left4dragokas
    Reply With Quote #2

    Updated.

    Quote:
    0.3 (28-Jan-2020)
    - Fixed counting tanks on versus (thanks Nuki for report and detailed explanation).
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 06-05-2021 , 09:25   Re: [inc] Left4dragokas
    Reply With Quote #3

    Updated.

    Quote:
    0.4 (05-Jun-2021)
    - Added forward "OnTankCountSpawnedPerRoundChanged" to get info about total number of tanks spawned per this round, excluding those been instantly kicked for some reason.
    - Forward "OnTankCountChanged" is 2 frames delayed to prevent it from firing when the number of tanks is not changed in case tank was instantly kicked via KickClient() command.
    - Some optimizations.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Darkwob
    BANNED
    Join Date: Oct 2018
    Old 06-05-2021 , 21:44   Re: [inc] Left4dragokas
    Reply With Quote #4

    I know this is not the place, but how do we use these .inc files? So how should we use the codes in it?

    Is that so?
    Quote:
    forward void OnTankCountChanged(int iCount);
    Or can we use it according to our own mind?
    Quote:
    public action OnTankCountChanged(bool handle, int client, dontbroadcast]
    Darkwob is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 06-06-2021 , 00:35   Re: [inc] Left4dragokas
    Reply With Quote #5

    The same way as any other forward (including native SourceMod).

    You need to replace "forward" keyword with "public":

    PHP Code:
    public void OnTankCountChanged(int iCount)
    {
        
    PrintToChatAll("Tanks count changed: %i"iCount);
    }

    public 
    void OnTankCountSpawnedPerRoundChanged(int iCount)
    {
        
    PrintToChatAll("Tanks per this round: %i"iCount);

    In above case sp-file is also required to run on server to make those forwards fire.

    .inc file is optional at the moment, but that can be changed, so it's always good to include it first:
    PHP Code:
    #include <left4dragokas> 
    It can contain executable code, various declarations and defines which could serve as identification mark whether .inc file is included or not.

    At the moment only 2 forwards are present, but who knows when I'm going to extent it.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 06-06-2021 at 00:36.
    Dragokas is offline
    Darkwob
    BANNED
    Join Date: Oct 2018
    Old 06-06-2021 , 14:14   Re: [inc] Left4dragokas
    Reply With Quote #6

    Quote:
    Originally Posted by Dragokas View Post
    The same way as any other forward (including native SourceMod).

    You need to replace "forward" keyword with "public":

    PHP Code:
    public void OnTankCountChanged(int iCount)
    {
        
    PrintToChatAll("Tanks count changed: %i"iCount);
    }

    public 
    void OnTankCountSpawnedPerRoundChanged(int iCount)
    {
        
    PrintToChatAll("Tanks per this round: %i"iCount);

    In above case sp-file is also required to run on server to make those forwards fire.

    .inc file is optional at the moment, but that can be changed, so it's always good to include it first:
    PHP Code:
    #include <left4dragokas> 
    It can contain executable code, various declarations and defines which could serve as identification mark whether .inc file is included or not.

    At the moment only 2 forwards are present, but who knows when I'm going to extent it.
    Thanks Dragokas for your help.
    Darkwob is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 10-04-2022 , 15:30   Re: [L4D] Left 4 Dragokas | API
    Reply With Quote #7

    Updated.

    Quote:
    0.5 (12-Jun-2021)
    - Added forward "OnDoorUsed" - Called whenever somebody used the saferoom or final door.
    - Registered library "left4dragokas" for easily identify this dependency.

    0.6 (Date unknown)
    - Added ConVar "left4dragokas_version"
    - Added ZOMBIECLASS, DOOR_TYPE and DOOR_STATE (as int types)
    - Added team defines: TEAM_SPECTATOR, TEAM_SURVIVOR, TEAM_INFECTED
    - Added stock IsPlayerIncapped()
    - Added stock IsClientRootAdmin()
    - Added stock IsPlayerPinned()
    - Added stock GetPwnInfected
    - Added stock ForcePanicEvent()
    - Added stock SpawnInfectedAt()
    - Added stock IsCommonInfected()
    - Added stock IsSurvivor()
    - Added stock IsWitch()
    - Added stock GetCommonsCount()
    - Added stock Chase()
    - Added stock IsTank()
    - Added stock IsBoomer()
    - Added stock IsSmoker()
    - Added stock IsHunter()
    - Added stock IsCharger()
    - Added stock IsJockey()
    - Added stock IsSpitter()
    - Added stock IsValidEntRef()
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Reply


    Thread Tools
    Display Modes

    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 08:32.


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