Raised This Month: $51 Target: $400
 12% 

[L4D2] Insider of Survivor v3.4 (unapproved)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
little_froy
Senior Member
Join Date: May 2021
Plugin ID:
7698
Plugin Version:
3.4
Plugin Category:
All
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    [L4D2] Insider of Survivor
    Unapprover:
    Reason for Unapproving:
    Request by author
    Old 06-23-2021 , 07:50   [L4D2] Insider of Survivor v3.4 (unapproved)
    Reply With Quote #1

    (unapproved)

    Last edited by little_froy; 01-04-2023 at 01:48.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-23-2021 , 11:15   Re: [L4D2] Insider of Survivor
    Reply With Quote #2

    Better stock to get random client:

    PHP Code:
    stock int GetAnyRandomClient()
    {
        
    int client;
        
    ArrayList aClients = new ArrayList();

        for( 
    int i 1<= MaxClientsi++ )
        {
            if( 
    IsClientInGame(i) && GetClientTeam(i) == && IsPlayerAlive(i) )
            {
                
    aClients.Push(i);
            }
        }

        if( 
    aClients.Length )
            
    client aClients.Get(GetRandomInt(0aClients.Length 1));

        
    delete aClients;

        return 
    client;

    Replace "OnClientPostAdminCheck" with "OnClientPutInServer". Otherwise when the server loses connection with Steam they won't be validated and the client won't be hooked.

    Change "int Insider[MAXPLAYERS+1] = {0, ...};" to "int Insider[MAXPLAYERS+1]" the default value when the variable is initialized is already 0.

    All your plugins custom functions don't need public e.g. "public bool IsPlayerFalling" should just be "bool IsPlayerFalling"
    __________________

    Last edited by Silvers; 06-23-2021 at 11:19.
    Silvers is offline
    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 04:09.


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