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

[TF2] Jump Info (v1.0.1, 03.06.2014)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Catface100
Junior Member
Join Date: Apr 2014
Plugin ID:
4230
Plugin Version:
1.0.1
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Tells user in chat whether the jump map is for demo or soldier upon joining.
    Old 06-03-2014 , 10:21   [TF2] Jump Info (v1.0.1, 03.06.2014)
    Reply With Quote #1

    Jump Info v1.0.1

    This plugin is my first, and I just want to throw out there that I don't really have any idea what I'm doing with sourcemod scripting, I wrote this from looking at other plugins and how they were made, especially the helpmenu v0.3, so thank you too all those authors! I made it to use on my server, but figured I'd allow anyone else to use it should they want to.

    Now that formalities are out of the way..


    Description:

    This plugin is intended to be used with jump maps and anything that allows you to have map specific configs, I have tested it with this one: https://forums.alliedmods.net/showthread.php?p=607079

    The plugin tells the user after they join the server whether the map is intended for demoman, soldier or both in the chat.

    Cvars:
    - sm_jumpinfo_enable: 1 enables the plugin, 0 disables it (default 1)
    - sm_jumpinfo_class: 1 prints soldier, 2 prints demoman, 3 prints both (default 1)
    Installation:
    Simply place jumpinfo.smx in the addons\sourcemod\plugins folder, and place jumpinfo.sp in the addons\sourcemod\scripting folder.

    Dependencies:
    While you don't need another plugin for this to function, it's fairly useless without the ability to change the cvar for each map, so any way of having map specific configs should work, although it has only been tested with the one mentioned in the description.

    Changelog:
    Quote:
    03-06-2014 (v1.0.1)

    *Tidied and improved code slightly

    03-06-2014 (v1.0)

    * Initial Release
    Screenshots (attached):
    pl_upward using default value from server.cfg


    cp_badlands using sm_jumpinfo_class 2 in cp_badlands.cfg


    cp_process_final using sm_jumpinfo_class 3 in cp_process_final.cfg


    (I didn't have any jump maps installed on the server I was testing it on, but you get the idea)

    Final notes:
    As I have said, I'm a real beginner when it comes to scripting in sourcemod, if you want to take this code and change it, please feel free to.
    Attached Files
    File Type: sp Get Plugin or Get Source (jumpinfo.sp - 709 views - 1.4 KB)

    Last edited by Catface100; 06-03-2014 at 11:37. Reason: Smaller images
    Catface100 is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 06-03-2014 , 11:26   Re: [TF2] Jump Info (v1.0, 03.06.2014)
    Reply With Quote #2

    Two things:

    Change the following line...
    Code:
    CreateTimer(30.0, Timer_JoinMessage, client);
    to...
    Code:
    CreateTimer(30.0, Timer_JoinMessage, GetClientUserId(client));
    You also do not need to check if client is connected, just if client is in-game for the timer itself.

    - Jack
    Drixevel is offline
    Catface100
    Junior Member
    Join Date: Apr 2014
    Old 06-03-2014 , 11:31   Re: [TF2] Jump Info (v1.0, 03.06.2014)
    Reply With Quote #3

    Ok, thanks. The changes should be made now.

    Last edited by Catface100; 06-05-2014 at 08:21.
    Catface100 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 00:04.


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