PDA

View Full Version : Raffle V1.0.2


sumguy14
06-05-2007, 00:45
Version 1.0.2

Description:

My first plugin in SourceMod. It's a pretty simple little plugin. Any player on the server can type 'donate <amount of cash/all>' and donate a certain amount of money or 'all' their money to this pot. You can donate as many times as you want. When two players have donated to this pot it becomes "active" while the pot is active players are prompted to make a donation. It then starts to count rounds. After the 3rd round it picks a winner, the winner is picked based off how much money you have donated. If 3 players donated:

Playerx
Playery &
Playerz

Those 3 players are the only ones eligible to win the pot.
If Playerx donated $5000, Playery donated $20000, and Playerz donates $1, Playerz will almost definetly not win, Playerx has around a 20% chance and Playery will most likely (80% chance) win.

Todo:
o Code it better

Changelog
o V1.0.0
-Released

o V1.0.1
- Changed name to Raffle
- Added menu for donating (accessible through 'donate')
- Cleaned it up a little
- Menu pops up to players who haven't donated every round the pot is active

o V1.0.2

- Uses PrintToChat(All) now
- Changed some variable names and messages
- Other small things I don't remember

FlyingMongoose
06-05-2007, 02:31
I think raffle would be a better name, but good job anyway :)

sslice
06-05-2007, 03:07
Yeah, from the name I thought it was a way to donate money to other players.

Looks like a neat plugin otherwise.

sumguy14
06-05-2007, 17:29
Thank you :)

Heh, yeah it kinda does sound like a plugin that gives others cash.
I will probably change the name for next version. Learnin' menus right now.

API
06-05-2007, 19:36
Glad to see you got it out the door, good job. :]

API
06-06-2007, 01:28
Great update :]
You are starting to get the hang of this.

FlyingMongoose
06-06-2007, 03:37
Since you changed the name your cvars and commands should reflect the name change imo

sumguy14
06-06-2007, 17:38
Well I might not change those (btw I changed the name real quickly last night)

While the name of the plugin is "raffle" you do still donate money.

When I think of things to update it with I will probably eventually rename the cvars and such.

sumguy14
06-12-2007, 19:23
Update:

- Uses PrintToChat(All) now
- Changed some variable names and messages
- Other small things I don't remember

ferret
09-18-2007, 12:26
Sumguy, is this still supported? Please fill out the plugin fields if so.

sumguy14
09-23-2007, 13:23
Yeah, kinda forgot about this plugin :P. My first one.

I filled everything out and checked for any depreciated functions.

WAF
12-18-2007, 19:00
i get contact plugin producer is it still anywhere?

sumguy14
12-26-2007, 20:36
Wonderful, looks like some stuff was depreciated.

I will install newest SM and see what needs to be fixed (should be fixed soon)

WAF
12-30-2007, 06:53
verry nice thanks

Cybot
07-28-2008, 12:11
tried to download:
"Plugin failed to compile! Please try contacting the author."

Lebson506th
07-28-2008, 12:39
Try this

Deathrunner.net
08-18-2009, 12:46
Hey, I know this is an old plugin and all but could i just request someone to quickly edit the .sp file for me and make it instead of giving the winner the money to use this command:
sm_bankadd <name> <winner amount>

Thanks, I really appreciate it