Raised This Month: $ Target: $400
 0% 

[TF2] - Trial Admin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mortdredd
Senior Member
Join Date: Dec 2009
Plugin ID:
1489
Plugin Version:
0.4
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    [TF2] - Trial Admin give players the 'o' flag for 30 mins
    Unapprover:
    Reason for Unapproving:
    Many bugs reported, unsupported.
    Old 02-21-2010 , 16:06   [TF2] - Trial Admin
    Reply With Quote #1

    This Mod is my first so be kind!

    It enables anyone who types !trial to recieve the 'o' flag for 30 min's enableing them to try out what donators get

    **********************
    ******CHANGE LOG******
    **********************

    VERSION 0.1
    WROTE PLUGIN

    VERSION 0.2
    ADDED TIMER TO REMOVE FLAG AFTER 30 MINS

    VERSION 0.3
    INCLUDED PRINT TO CHAT MESSAGE FORE USERS

    VERSION 0.4
    CORRECTED TAG MISSMATCH


    **********************
    ********TO DO*********
    **********************

    Intergrate SQL so they can only do this once per 24 hours and it applies across multiple servers
    Attached Files
    File Type: sp Get Plugin or Get Source (Trial0.3.sp - 505 views - 1.5 KB)
    File Type: sp Get Plugin or Get Source (Trial0.4.sp - 572 views - 1.5 KB)

    Last edited by Mortdredd; 02-22-2010 at 01:18. Reason: UPDATE/CORRECTION
    Mortdredd is offline
    Jindo
    AlliedModders Donor
    Join Date: May 2009
    Location: England, UK
    Old 02-21-2010 , 16:12   Re: [TF2] - Trial Admin
    Reply With Quote #2

    It's a nice idea but you might want to add a cvar to allow people to configure which flag is given to players, not all servers will use 'o' as an admin flag.
    __________________
    Jindo is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 02-21-2010 , 16:18   Re: [TF2] - Trial Admin
    Reply With Quote #3

    Good work for your first plugin.

    Ya, I think youre gonna have to use SQL in this...


    Noticed one small issue off the bat. Did you see the tag mismatches?

    Code:
    CreateTrial(client)
    {
        new Duration = GetConVarFloat(trial_time);
        CreateTimer(Duration, Timer_Regen, client);    
    }
    Should be

    Code:
    CreateTrial(client)
    {
        new Float:Duration = GetConVarFloat(trial_time);
        CreateTimer(Duration, Timer_Regen, client);    
    }
    Did you test and see if it works? Cause, im not sure this works...

    Last edited by retsam; 02-21-2010 at 16:25.
    retsam is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 02-21-2010 , 16:26   Re: [TF2] - Trial Admin
    Reply With Quote #4

    Couldn't you just use the command again once the trial ends?
    noodleboy347 is offline
    Mortdredd
    Senior Member
    Join Date: Dec 2009
    Old 02-21-2010 , 17:12   Re: [TF2] - Trial Admin
    Reply With Quote #5

    i had not seen the error and will change it asap. it is tested and working on 2 of my servers atm.

    and yes they can use it again (until i work out how to link this with mysql)
    Mortdredd is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 02-21-2010 , 17:23   Re: [TF2] - Trial Admin
    Reply With Quote #6

    I did a quick test, and it doesnt work for me at all, just fyi.
    retsam is offline
    DarkEnergy
    SourceMod Donor
    Join Date: Apr 2008
    Location: Georgia Tech, MSECE
    Old 02-21-2010 , 17:41   Re: [TF2] - Trial Admin
    Reply With Quote #7

    Team Fortress 2 Only

    Plugin Game:
    Any


    better change it


    map change the admin would be gone, and he would be able to try again
    DarkEnergy is offline
    Mortdredd
    Senior Member
    Join Date: Dec 2009
    Old 02-22-2010 , 01:14   Re: [TF2] - Trial Admin
    Reply With Quote #8

    @ Retsam : I've made the change to the code you have pointed out and uploaded V0.4 Not sure why it is not working for you, does it say it has loaded successfully in the server console?

    @ DarkEnergy : I noticed all that got emptied after i did a preview of the post, no idea how to go back and change it now tho

    @ All : you can see this working on my server: 212.124.204.38:27015 - Zombie Fortress 24/7 but as i dont have fast download set up you might want to get the maps from fpsbananna (assylum, Barn V2, Fortress i think are the only ones on there despite the MOTD) if you use !trial you should get the 30 min on screen prompt then be able to use !RTD

    also how do i make it populate the "servers with this plugin" field?

    Last edited by Mortdredd; 02-22-2010 at 10:15.
    Mortdredd is offline
    bouncer
    Veteran Member
    Join Date: Apr 2009
    Old 02-22-2010 , 15:16   Re: [TF2] - Trial Admin
    Reply With Quote #9

    Yeah you really might want to tie this up with MYSQL in order to use it on multiple servers

    and thanks!

    EDIT: Is this TF2 only? If so, whouldnt it work on any game?
    __________________



    Last edited by bouncer; 02-22-2010 at 15:25.
    bouncer is offline
    will2tango
    Member
    Join Date: Nov 2009
    Location: England
    Old 02-22-2010 , 16:02   Re: [TF2] - Trial Admin
    Reply With Quote #10

    Hi Mortdredd,
    Nice plugin, i have been looking for temp admin code for a while now

    Im only new to sourcemod coding but i dont think you need lines 2-4...

    #include <sdktools>
    #include <tf2>
    #include <tf2_stocks>

    Also you dont need the folder check for TF2 (Lines 19-29) this would make it multi mod, I have removed those lines and it works perfectly with my ZPS server.

    Thanks again, your code is a great help!
    will2tango 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:48.


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