Raised This Month: $ Target: $400
 0% 

[L4D2] Player Joining


Post New Thread Reply   
 
Thread Tools Display Modes
Chronic1
SourceMod Donor
Join Date: Jun 2011
Old 08-23-2011 , 15:15   Re: [L4D2] Player Joining
Reply With Quote #11

Can someone edit this so it only shows who is connecting? I dont need it to show "player joined survivors" "Player joined Infected"

I just want it to show "player connected"
Chronic1 is offline
gilmon
Senior Member
Join Date: Feb 2011
Location: China
Old 08-24-2011 , 22:29   Re: [L4D2] Player Joining
Reply With Quote #12

I writed one for my server.
This only show who joined the servers and won't show the infected.
Attached Files
File Type: sp Get Plugin or Get Source (l4d(2)_playerjoined.sp - 1258 views - 1.3 KB)
gilmon is offline
Send a message via MSN to gilmon
Chronic1
SourceMod Donor
Join Date: Jun 2011
Old 08-27-2011 , 01:41   Re: [L4D2] Player Joining
Reply With Quote #13

does that still say joined survivors or Joined Infected? How can I make it so it only tells me who is connecting?
Chronic1 is offline
gilmon
Senior Member
Join Date: Feb 2011
Location: China
Old 08-28-2011 , 04:59   Re: [L4D2] Player Joining
Reply With Quote #14

Please try it before you say it's work or not,thanks.
gilmon is offline
Send a message via MSN to gilmon
Chronic1
SourceMod Donor
Join Date: Jun 2011
Old 08-28-2011 , 15:06   Re: [L4D2] Player Joining
Reply With Quote #15

I tried it but your English is very bad. I fixed it for you. Also removed the player left game because the game already tells you when a players leaves. With your plugin i get the message twice when someone leaves.

Chronic has left the game
Chronic is leave the game

"Chronic is join the game" should be "Chronic is connecting to the server."

This is what I wanted, thanks for your code, i just removed the player disconnect and fixed your English.


Code:
#include <sourcemod>

#define PLUGIN_VERSION "1.0"

public Plugin:myinfo = 
{
    name = "[L4D2]Player Join",
    author = "gilmon",
    description = "Show who joined the server",
    version = PLUGIN_VERSION,
    url = "http://www.sourcemod.net/"
};

public OnClientAuthorized(client)
{
    if(!(client>0 && client<=MaxClients))
        return;

    new String:sAuthString[32];
    GetClientName(client, sAuthString, sizeof(sAuthString));

    if(!IsFakeClient(client) && StrEqual(sAuthString, "", false))
        return;

    if(!IsFakeClient(client))
    {
        if(client==0)
            return;

        decl String:file[PLATFORM_MAX_PATH], String:playername[128];
        BuildPath(Path_SM, file, sizeof(file), "logs/joinedplayer.log");

        GetClientName(client, playername, sizeof(playername));
        LogToFileEx(file, "Player %s Connected to server", playername);
        PrintToChatAll("\x03%s\x01 \x04is connecting to the server.\x01", playername);
    }
    return;
}

Last edited by Chronic1; 08-29-2011 at 03:47.
Chronic1 is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 08-29-2011 , 10:55   Re: [L4D2] Player Joining
Reply With Quote #16

wow, that code is a mess.

This is all you need to show a connecting player.

PHP Code:
public OnClientConnected(client)
{
    if(!
IsFakeClient(client))
    {
           
PrintToChatAll("%N has joined the game"client)
    }


Last edited by Visual77; 08-29-2011 at 10:58.
Visual77 is offline
Chronic1
SourceMod Donor
Join Date: Jun 2011
Old 08-31-2011 , 18:34   Re: [L4D2] Player Joining
Reply With Quote #17

Thanks for cleaning it up. That isnt my code, i have no idea how to write code. I just know how to correct bad English and delete unneeded sections of code
__________________
Chronic1 is offline
TheSuggestioner
Member
Join Date: Aug 2011
Location: USA, Connecticut
Old 09-02-2011 , 17:15   Re: [L4D2] Player Joining
Reply With Quote #18

Make it only say that when the player actually connected to a game, or add a simple cvar which makes it say "{playername} has joined the game" so they are fully loaded and my clients know that they are actually joined in the game. When it says "{playername} has connected to the server" It makes my clients think that they had actually been fully loaded. They keep saying "Hello" and "Hi" and keep spamming, "are you there?" "why aren't you talking" so it is kind of embarrassing.
So my idea of a simple cvar would be

l4d2_simplejoin "0" (0 disables the simple "{playername} has joined the game")
__________________
Roses are Red
Violets are blue,
Not a big surprise
If a Tank kills you!
TheSuggestioner is offline
ellie3535
Junior Member
Join Date: Jan 2011
Old 08-09-2012 , 02:54   Re: [L4D2] Player Joining
Reply With Quote #19

This plugin seems not working anymore.....
ellie3535 is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-09-2012 , 04:45   Re: [L4D2] Player Joining
Reply With Quote #20

Quote:
Originally Posted by ellie3535 View Post
This plugin seems not working anymore.....
Why? please include your problem.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo 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 14:43.


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