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

[ANY] Giveaway v1.4 [1/16/17]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
Plugin ID:
4628
Plugin Version:
1.4
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Picks a random connected client and displays their name as the winner of the giveaway.
    Old 05-09-2015 , 13:40   [ANY] Giveaway v1.4 [1/16/17]
    Reply With Quote #1

    [ANY] Giveaway v1.4 [1/16/17]

    Created a simple plugin to pick a random connected client and display their name as the winner of the giveaway.
    Admins with z flag (by default) can access the command by using !giveaway and typing the item after it.
    This should work in any game but it has only been tested in CS:GO. Message me if there are any problems in any other games.
    This was one of my first plugins so please tell me if there are any issues.

    Cvars:

    sm_giveaway_minplayers (2) - Minimum amount of players to do a giveaway at.
    sm_giveaway_tidychat (1) - Remove excess chat messages
    sm_giveaway_clantag ("") - Only allow winners with this clan tag (Empty for disabled) [CSS/CSGO Only]
    sm_giveaway_chattag ("[SM") - Tag to use in chat messages
    sm_giveaway_delay_start (1) - How long until the giveaway will start
    sm_giveaway_delay_end (2) - How long until a winner should be announced after starting
    sm_giveaway_winner_sound ("ui/coin_pickup_01.wav") - Sound to play once a winner is selected (Default sound 'ui/coin_pickup_01.wav' is already included in csgo)

    Commands:

    sm_giveaway <giveaway item>

    Installation:

    Place giveaway.smx in addons/sourcemod/plugins

    Todo:

    Nothing yet, leave suggestions

    Changelog:
    Code:
    1.0 - Initial Release
    1.1 - Fixed many stupid bugs and code
    1.2 - Added clan tag support
    1.3 - Added support for games other than CSS/CS:GO
    1.4 - Tidied up messy code, changed cvar names, added support for custom sound when winner is picked, added ability to delay start and end of giveaway
    Attached Files
    File Type: sp Get Plugin or Get Source (giveaway.sp - 511 views - 5.8 KB)
    File Type: inc emitsoundany.inc (6.0 KB, 349 views)
    File Type: smx giveaway.smx (8.9 KB, 475 views)

    Last edited by Addicted.; 01-16-2017 at 13:37.
    Addicted. is offline
    secondtimesold
    Senior Member
    Join Date: Feb 2015
    Old 05-09-2015 , 15:22   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #2

    i use a similar plugin for raffles but yours is unique because it allows you to list the name of the item being raffle and it cleans up the chat to make it more visible.. sometimes when i initiate a raffle using another plugin, players dont see it in time.. so the tidy chat cleanup is cool.

    one thing i would like to see with this is for it to be more interactive to the player. like a say command like !raffle to have that player draw a number randomly and person with highest number would win..

    without the player interaction its just so uneventful..

    just my opinion, otherwise, nice plugin thanks!
    __________________

    Last edited by secondtimesold; 05-09-2015 at 15:23.
    secondtimesold is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 05-09-2015 , 15:28   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #3

    Quote:
    Originally Posted by secondtimesold View Post
    i use a similar plugin for raffles but yours is unique because it allows you to list the name of the item being raffle and it cleans up the chat to make it more visible.. sometimes when i initiate a raffle using another plugin, players dont see it in time.. so the tidy chat cleanup is cool.

    one thing i would like to see with this is for it to be more interactive to the player. like a say command like !raffle to have that player draw a number randomly and person with highest number would win..

    without the player interaction its just so uneventful..

    just my opinion, otherwise, nice plugin thanks!

    I thought about that but there is a plugin very similar: https://forums.alliedmods.net/showthread.php?t=249129

    I wanted a simple automatic solution for giveaways on my servers , so I made this plugin.

    Other suggestions that the other plugin doesn't have, I would be happy to include.

    Last edited by Addicted.; 05-09-2015 at 15:29.
    Addicted. is offline
    sdh
    New Member
    Join Date: Oct 2010
    Old 05-28-2015 , 20:01   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #4

    can add same than other...the admin have control in raffle,for start the players type !join...later for ends have a one countdown and annunce the winner. can have too menu for start/ends the raffle
    sdh is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 05-29-2015 , 07:53   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #5

    Quote:
    Originally Posted by sdh View Post
    can add same than other...the admin have control in raffle,for start the players type !join...later for ends have a one countdown and annunce the winner. can have too menu for start/ends the raffle
    Good idea, I'll update it when I get a chance later on.
    Addicted. is offline
    penalte
    Member
    Join Date: Jan 2016
    Old 02-13-2016 , 18:58   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #6

    please help me im trying to modifie your plugin so it can give store credits, can you help me, i added this code

    if (name[client] == winner)
    {
    Store_GiveCredits(GetSteamAccountID(client), credits)
    }

    and this

    new client;
    decl String:name[64];
    GetCmdArgString(Arg1, sizeof(Arg1));
    int credits = StringToInt(Arg1);
    penalte is offline
    penalte
    Member
    Join Date: Jan 2016
    Old 02-14-2016 , 00:50   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #7

    done tank you anyway.
    penalte is offline
    weeeishy
    Senior Member
    Join Date: Jul 2015
    Location: Kuwait
    Old 03-14-2016 , 13:55   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #8

    It only chooses from the CT team .


    Is it possible to make it for both of the teams?
    __________________
    weeeishy is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 03-14-2016 , 21:45   Re: [ANY] Giveaway v1.0 [5/9/15]
    Reply With Quote #9

    Quote:
    Originally Posted by weeeishy View Post
    It only chooses from the CT team .


    Is it possible to make it for both of the teams?
    Done.

    I just realized how badly this was made before lmao
    Addicted. is offline
    VasqueS
    Member
    Join Date: Jan 2015
    Old 03-18-2016 , 14:45   Re: [ANY] Giveaway v1.1 [3/14/16]
    Reply With Quote #10

    Its possible to make only for players who are using a specific steam group tag?
    VasqueS 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 22:12.


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