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

[CSS] Spawn on Connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Timtam
Junior Member
Join Date: Aug 2009
Plugin ID:
1240
Plugin Version:
1.1.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows players who first join to be spawned.
    Unapprover:
    Reason for Unapproving:
    does nothing; not tested by author;
    Old 10-22-2009 , 19:21   [CSS] Spawn on Connect
    Reply With Quote #1

    Spawn on Connect

    Description:

    I run a few various servers where I wanted the users who first join the server to be spawned. This is an extremely easy plugin which allows this. Useful for servers such as Surf Skill maps which do not run DeathMatch. As far as I could see, there were no other plugins which did only this.

    Note: This does NOT block them from re-joining to be spawned. I would recommend installing Exvel's anti-rejoin plugin, located HERE to counter this.

    Requirements:
    Sourcemod 1.2+

    Only tested on CS:S.

    Installation:

    Place the spawnonconnect.smx in your addons/sourcemod/plugins folder and restart your server.

    Changelog:
    • 1.0.0 Initial Release
    • 1.0.1 Fixed a very stupid error. Thanks Meng.
    • 1.1.0 Added On/Off Cvar
    To-do:
    • None.
    Bugs:
    • Sometimes all alive players are slayed. Need to investigate and see why and how to resolve this. Thanks thetwistedpanda for bringing to to my attention, and suggesting ways to fix it.

    Credits: Alexander, meng.
    Attached Files
    File Type: sp Get Plugin or Get Source (spawnonconnect.sp - 750 views - 1.1 KB)

    Last edited by Timtam; 12-02-2009 at 06:38.
    Timtam is offline
    daleGEND
    AlliedModders Donor
    Join Date: Feb 2005
    Location: USA
    Old 11-06-2009 , 20:42   Re: Spawn on Connect
    Reply With Quote #2

    This doesn't really work for me at all.
    __________________
    Bor3d Gaming - A Mature Online Gaming Community

    Feel free to add me on STEAM as well: https://steamcommunity.com/id/b0r3d
    daleGEND is offline
    Timtam
    Junior Member
    Join Date: Aug 2009
    Old 11-07-2009 , 17:36   Re: Spawn on Connect
    Reply With Quote #3

    Quote:
    Originally Posted by daleGEND View Post
    This doesn't really work for me at all.
    Weird, it works fine for me. Try now.
    Timtam is offline
    SilentLikeSilence
    Senior Member
    Join Date: Jul 2009
    Old 11-07-2009 , 18:17   Re: Spawn on Connect
    Reply With Quote #4

    PHP Code:
    public OnPluginStart()
    {
        
    HookEvent("player_death"Event_PlayerDeath);
    }

    public 
    Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
    {
        
    //code is here

    This is just an example, here is the full list of events (css)

    http://wiki.alliedmods.net/Counter-S..._Source_Events
    SilentLikeSilence is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 11-07-2009 , 20:04   Re: Spawn on Connect
    Reply With Quote #5

    You can expand on this further and institute a repeating timer that counts how many seconds have passed since round start. If it's over 25 (or 30) seconds, then actually spawn the player. Otherwise you get a little nasty bug where living players are slayed.
    __________________
    thetwistedpanda is offline
    CollinHell
    Junior Member
    Join Date: Nov 2009
    Location: Ossining, New York
    Old 11-14-2009 , 21:08   Re: Spawn on Connect
    Reply With Quote #6

    Plugin failed to compile, please fix this, such a great idea for a plugin, and I really need it.
    CollinHell is offline
    meng
    Veteran Member
    Join Date: Oct 2005
    Location: us
    Old 11-15-2009 , 01:20   Re: Spawn on Connect
    Reply With Quote #7

    this is a useful plugin. btw your plugin isnt compiling because its missing a " mark in Plugin:myinfo. you could also try something like this.
    PHP Code:
    public OnPluginStart()
    {
        
    RegConsoleCmd("joinclass"Command_JoinClass);
    }

    public 
    Action:Command_JoinClass(clientargs)
    {
        
    CreateTimer(1.0SpawnLateJoiningPlayerclient);
    }

    public 
    Action:SpawnLateJoiningPlayer(Handle:timerany:client)
    {
        if (
    IsClientInGame(client) && !IsPlayerAlive(client))
        {
            
    CS_RespawnPlayer(client);
        }


    Last edited by meng; 11-15-2009 at 23:02.
    meng is offline
    Send a message via Yahoo to meng
    Timtam
    Junior Member
    Join Date: Aug 2009
    Old 11-23-2009 , 00:43   Re: Spawn on Connect
    Reply With Quote #8

    My apologies about the non-compiling error guys, I haven't had a chance to work on this plugin at all since the initial release. I'll get my ass into gear now.

    Fixed version uploaded.

    EDIT:
    Quote:
    Originally Posted by thetwistedpanda View Post
    You can expand on this further and institute a repeating timer that counts how many seconds have passed since round start. If it's over 25 (or 30) seconds, then actually spawn the player. Otherwise you get a little nasty bug where living players are slayed.
    I have not encountered this bug, however, I will look into it.

    Last edited by Timtam; 11-23-2009 at 00:49.
    Timtam is offline
    Timtam
    Junior Member
    Join Date: Aug 2009
    Old 12-01-2009 , 05:50   Re: Spawn on Connect
    Reply With Quote #9

    Released 1.1.0, unfortunately I haven't been able to test it, however, it should work. Added on/off CVar, and changed the code around a small amount.
    Timtam is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 12-27-2009 , 00:49   Re: [CSS] Spawn on Connect
    Reply With Quote #10

    The current version of this plugin does nothing at all. There is a timer callback that never gets called because the timer gets created in an event callback for an event that is never hooked.

    I think you mean to have this in OnPluginStart()
    PHP Code:
    HookEvent("player_team"EventJoinTeam); 

    Last edited by psychonic; 12-27-2009 at 00:50. Reason: blah. i'm tired
    psychonic 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 01:23.


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