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

[ANY] Raffle


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NuclearWatermelon
Junior Member
Join Date: Jun 2010
Plugin ID:
2090
Plugin Version:
0.9
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    25 
    Plugin Description:
    Allow an admin to make a raffle in-game.
    Old 11-23-2010 , 01:48   [ANY] Raffle
    Reply With Quote #1

    Made with the intention for holding raffles on TF2 trade servers by admins, this plugin ought to work on any source game (not tested on any but TF2) for whatever general purpose you might have for it.

    Simply use the below commands to operate the plugin, and enjoy.




    Installation:
    • Place smx into plugins folder.
    • Add contents of adminmenu_custom_additions.txt to the adminmenu_custom.txt file for an admin menu interface.




    Dependencies:

    Commands:
    • sm_raffle (/raffle): Preform a raffle
    • sm_raffle_assign [name] (/raffle_assign [name] [name2] [...]): Add a user to the raffle
    • sm_raffle_remove [name] (/raffle_remove [name] [name2] [...]): Remove a user from the raffle
    • sm_raffle_cancel (/raffle_cancel): Cancel a raffle
    • sm_raffle_list (/raffle_list): Lists all current participants in a raffle


    CVars:
    • sm_raffle_version


    Version Log:
    • v0.9: Changed from FindTarget to ProcessTargetString
    • v0.8: Removed immunity from targeting (and bots)
    • v0.7: Added logging to raffles
    • v0.6.2: Made sm_raffle_list a public command
    • v0.6.1: Bug fixes related to new features in 0.6
    • v0.6: Added list, cancel, and remove commands
    • v0.5: Added ability to add multiple users at once
    • v0.4: First public release
    Attached Files
    File Type: txt adminmenu_custom_additions.txt (770 Bytes, 1484 views)
    File Type: smx raffle.smx (8.4 KB, 1374 views)
    File Type: sp Get Plugin or Get Source (raffle.sp - 909 views - 6.3 KB)

    Last edited by NuclearWatermelon; 06-18-2011 at 23:10.
    NuclearWatermelon is offline
    Matheus28
    Senior Member
    Join Date: Aug 2009
    Old 11-23-2010 , 06:59   Re: [ANY] Raffle
    Reply With Quote #2

    Add an option to add multiple users at once by typing "/raffle_assing omg, lol, test"

    Last edited by Matheus28; 11-27-2010 at 16:55.
    Matheus28 is offline
    NuclearWatermelon
    Junior Member
    Join Date: Jun 2010
    Old 11-23-2010 , 22:47   Re: [ANY] Raffle
    Reply With Quote #3

    Quote:
    Originally Posted by Matheus28 View Post
    Add an option to add multiple users at once by typing "/reffle_assing omg, lol, test"
    Added this minus the comma. You can now put in multiple users like:

    /raffle_assign user1 user2 user3
    NuclearWatermelon is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 11-24-2010 , 01:49   Re: [ANY] Raffle
    Reply With Quote #4

    Raffle for what?? Is this just virtual so i would like state I'm about to hold a raffle for X weapon!

    If so, it would be cooler to do something like
    sm_raffletime 60 //seconds a raffle is held for
    sm_startraffle "Description of raffle"

    then a player sees the text
    Thraka is holding a raffle for [Description of raffle]
    Type !raffle in chat to get a ticket...

    Then the player would type !raffle (or maybe !ticket?) into chat
    You have been assigned raffle ticket #21413

    After 60 seconds passes one of the tickets is randomly drawn and everyone sees:
    [Name] has won the raffle with ticket #21413!

    The player sees
    You have won the raffle! Contact [Name of admin starting raffle] for your prize!
    Thraka is offline
    NuclearWatermelon
    Junior Member
    Join Date: Jun 2010
    Old 11-24-2010 , 01:53   Re: [ANY] Raffle
    Reply With Quote #5

    Quote:
    Originally Posted by Thraka View Post
    Raffle for what?? Is this just virtual so i would like state I'm about to hold a raffle for X weapon!

    If so, it would be cooler to do something like
    sm_raffletime 60 //seconds a raffle is held for
    sm_startraffle "Description of raffle"

    then a player sees the text
    Thraka is holding a raffle for [Description of raffle]
    Type !raffle in chat to get a ticket...

    Then the player would type !raffle (or maybe !ticket?) into chat
    You have been assigned raffle ticket #21413

    After 60 seconds passes one of the tickets is randomly drawn and everyone sees:
    [Name] has won the raffle with ticket #21413!

    The player sees
    You have won the raffle! Contact [Name of admin starting raffle] for your prize!
    The way we've been using it (in tf2) is that everyone who wishes to join the raffle hands an admin one weapon, and they are assigned a raffle number. At the end, we run the raffle and whoever wins gets all items from the pot. Of course, since it works for any SM game currently I am not trying to make it specific to TF2, but such things could be added.

    That said, I can see about adding something along the lines of /raffle_freeforall [time] [Description] which people could then join with /raffle_join

    Is that sort of what you are asking for?
    NuclearWatermelon is offline
    Matheus28
    Senior Member
    Join Date: Aug 2009
    Old 11-24-2010 , 06:40   Re: [ANY] Raffle
    Reply With Quote #6

    Well, that would be nice.
    Matheus28 is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 11-24-2010 , 11:05   Re: [ANY] Raffle
    Reply With Quote #7

    ahh gotcha, yah i like both styles really
    Thraka is offline
    h00x
    Senior Member
    Join Date: Jun 2009
    Old 11-24-2010 , 11:24   Re: [ANY] Raffle
    Reply With Quote #8

    So does this add the player to the raffle after it shows in chat that an item has been traded/given to an admin for the "raffle pot" and then give them a ticket/number? OR does it allow them to just join?
    h00x is offline
    NuclearWatermelon
    Junior Member
    Join Date: Jun 2010
    Old 11-24-2010 , 14:29   Re: [ANY] Raffle
    Reply With Quote #9

    Quote:
    Originally Posted by h00x View Post
    So does this add the player to the raffle after it shows in chat that an item has been traded/given to an admin for the "raffle pot" and then give them a ticket/number? OR does it allow them to just join?
    The admin has to use the /raffle_assign command to give a number to the person who gave them an item for the pot.

    We've always done it where we give the number immediately after the trade, but I suppose you could do them all at once now. However, I do believe that doing them immediately following the trade better shows the admin's good intent on the raffle.
    NuclearWatermelon is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 11-24-2010 , 17:29   Re: [ANY] Raffle
    Reply With Quote #10

    One thing that would make it officinal I think is something like sm_raffleprep

    This would post into chat in color
    A new raffle is starting! Donate an item to [Admin Name] to be entered to win all donated items.

    This way people cant hop on to the server and trick others into giving them items posing as an admin...
    Thraka is offline
    Reply


    Thread Tools
    Display Modes

    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 18:18.


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