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

Last man bets


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   devicenull (200)
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 06-11-2004 , 11:16   Last man bets
Reply With Quote #1

When two people remain, one on each team, the other players will have the chance to bet a sum of money on who will win the round.
You have to have a minimum of $100 (adjustable through a cvar) to place a bet, but then you can raise your bet as much as your wallet performs.
If your bet wins, you win the other betters money. The more you bet, the more you win. If you win. :-)
Everything is completely menu driven, no need to learn any commands or anything.
Bots bet automatically.

Pots: If no one bets on winning player, all failing bets will be added to the pot. The next player to win a bet (win the most money, if more win the same bet), gets the pot.
If pot is not collected before map ends/server shuts down/crashes ;-) it will be there for next map.

Example: If you bet $200 on the t player, and another person bets $100 on the t player, and the t player wins, you will receive 2/3rds of the total sum of money bet by all players.

Winning over $16000: Win prizes (optional)! For the money you win over $16000, you receive something:

For each You receive
---------------------------
$1000 Xtra life (respawn as long as round did not end when you died, a note to all players go out that you respawned - and how many lives you have left)
$100 Health boost (+100 health when spawning)
$10 Assault suit (if you don't have 100 armour when spawning, you will be given a full assault suit)
Attached Files
File Type: sma Get Plugin or Get Source (lastmanbets.sma - 57986 views - 38.0 KB)

Last edited by Johnny got his gun; 08-20-2007 at 17:00.
Johnny got his gun is offline
Ingerfara
Junior Member
Join Date: May 2004
Location: Sweden
Old 06-11-2004 , 11:37  
Reply With Quote #2

I get this error when prizes is disabled:
Code:
lastmanbets.sma(232) : warning 204: symbol is assigned a value that is never used: "victim"
And the server spits out this:
Code:
16:01:03: [AMXX] Function is not present (function "newround_event") (plugin "lastmanbets.amx")
16:01:03: [AMXX] Run time error 10 on line 858 (plugin "lastmanbets.amx")
__________________
Ingerfara is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 06-11-2004 , 13:30  
Reply With Quote #3

Thx should be fixed.
Johnny got his gun is offline
KiN | SuicideDog
Senior Member
Join Date: Mar 2004
Old 06-11-2004 , 20:58  
Reply With Quote #4

ok.. it looks like it has a problem with the menu check or something

L 06/11/2004 - 1674: [lastmanbets.amx] Betting will maybe start in 1.000000
seconds (if Toys'R'Us Kid that just died does not respawn, or the round ends)
L 06/11/2004 - 1675: [lastmanbets.amx] Bettings will now start. This server
supports 20 players.
L 06/11/2004 - 1675: [lastmanbets.amx] Player #1 (KiN | LanfeaR) is already
in another menu - your lastmanbets_overridemenues cvar is defined to not show be
t menu to ppl who already have a menu open.

L 06/11/2004 - 1675: [lastmanbets.amx] Player #2 (BiBBy[10]) is alive and wi
ll not be able to vote.
L 06/11/2004 - 1675: [lastmanbets.amx] Player #3 ([IA Bender]) is alive and
will not be able to vote.
L 06/11/2004 - 1675: [lastmanbets.amx] Player #4 (Toys'R'Us Kid) is already
in another menu - your lastmanbets_overridemenues cvar is defined to not show be
t menu to ppl who already have a menu open.


Niether ppl had a menu open and didn't get the bet menu. OVERRIDEPREVIOUSMENU cvar was set to the default you have but I also tried to setting it to 0 with no luck. When I set it to 0 I still get a error but I think it's slightly different (sorry I didn't grab it .. I 'll try to get it later) I have noticed that if the user is using the vgui menus instead of old style (mind you they aren't in them at the time of the betting, but they do use them to buy and what not) it has a problem.. it could be the reason I've never seen them on my machine ( i have them enabled but don't really use them).

I also found if I comment out #define IWANTPRIZES and recompile.. the plugin stops working. Do I also need to comment out the #define XTRA_HEALTHBOOST ? Could that be causing the problem?

Hope this helps. If you want me to try anything.. or give you more debugs messages let me know.

Followup: ok.. after more testing I found that FOR SURE if you use the vgui menus it always thinks you have a menu open. No matter what you do. If you use oldschool menus .. no problems.
__________________
Code:
#include <amxmodx> public client_connect(id){   new playerIQ    get_player_IQ(id,playerIQ)   if(playerIQ < 100 )  {     client_cmd(id,"say I'm too stupid to play;quit")  }   PLUGIN_CONTINUE}
KiN | SuicideDog is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 06-12-2004 , 08:34  
Reply With Quote #5

Ok yes you're right the betting wouldn't start at all if prizes were disabled, this is now fixed.

As for the other problem, I just can't recreate it. I use vgui menus and bettings work fine.
Johnny got his gun is offline
Kamikatze
Member
Join Date: Apr 2004
Old 06-12-2004 , 13:15  
Reply With Quote #6

Very funny plugin...

Can you make the debug mode as an cvar? So it should be easy to switch.

And sometimes the menu won't open... not on all players but on some (yes, they had more than 100 $)
__________________
Kamikatze
visit us at http://www.popl-clan.de
Kamikatze is offline
Kamikatze
Member
Join Date: Apr 2004
Old 06-12-2004 , 13:39   vault.ini?
Reply With Quote #7

Your plugin stores data in vault... but in an default installation of amxx thre is not a vault.ini.

Should i create it manually?
__________________
Kamikatze
visit us at http://www.popl-clan.de
Kamikatze is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 06-12-2004 , 14:23  
Reply With Quote #8

Vault is autocreated by AMX.

If menu doesnt open just run debugmode and look in console why they didn't get the menu.
Johnny got his gun is offline
Kamikatze
Member
Join Date: Apr 2004
Old 06-12-2004 , 23:36  
Reply With Quote #9

Hmm, I,ve gone to debug mode.. look at this:
  • L 06/13/2004 - 04:04:45: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if TeamGermany|Leo that just died does not respawn, or the round ends)
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #2 (bss | Karl) does only have $15, which is below the $100 needed to be able to vote.
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #3 (bss | Kloppi) does only have $90, which is below the $100 needed to be able to vote.
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #4 (bss | Asche) is alive and will not be able to vote.
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #5 (*M*E*R*U*) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:04:46: [lastmanbets.amx] Player #7 (Too StOnEd) is alive and will not be able to vote.
    L 06/13/2004 - 04:07:08: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if TeamGermany|Leo that just died does not respawn, or the round ends)
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #2 (bss | Karl) does only have $5, which is below the $100 needed to be able to vote.
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #3 (bss | Kloppi) is a bot and will bet...
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #4 (bss | Asche) is alive and will not be able to vote.
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #5 (*M*E*R*U*) is alive and will not be able to vote.
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #7 (Too StOnEd) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:07:09: [lastmanbets.amx] Player #8 (Viper) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:11:22: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "Viper<12><STEAM_0:1:2832480><>"
    L 06/13/2004 - 04:11:23: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "Viper<12><STEAM_0:1:2832480><>"
    L 06/13/2004 - 04:11:23: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "Viper<12><STEAM_0:1:2832480><>"
    L 06/13/2004 - 04:11:23: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "Viper<12><STEAM_0:1:2832480><>"
    L 06/13/2004 - 04:11:23: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "Viper<12><STEAM_0:1:2832480><>"
    L 06/13/2004 - 04:12:00: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if TeamGermany|Leo that just died does not respawn, or the round ends)
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #2 (bss | Karl) is a bot and will bet...
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #3 (bss | Kloppi) is alive and will not be able to vote.
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #4 (bss | Asche) is a bot and will bet...
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #5 (*M*E*R*U*) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #7 (Too StOnEd) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:12:01: [lastmanbets.amx] Player #8 (Viper) is alive and will not be able to vote.
    L 06/13/2004 - 04:14:24: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if Too StOnEd that just died does not respawn, or the round ends)
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is alive and will not be able to vote.
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #2 (bss | Karl) is a bot and will bet...
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #3 (bss | Kloppi) is a bot and will bet...
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #4 (bss | Asche) is a bot and will bet...
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #5 (*M*E*R*U*) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is alive and will not be able to vote.
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #7 (Too StOnEd) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:14:25: [lastmanbets.amx] Player #8 (Viper) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:15:06: [high_ping_kicker.amx] Highpingkick: "ming<15><STEAM_0:1:2584981>" was kicked due highping (Average Ping "328")
    L 06/13/2004 - 04:15:28: [high_ping_kicker.amx] Highpingkick: "n3x`is a pG?<16><STEAM_0:1:257265>" was kicked due highping (Average Ping "917")
    L 06/13/2004 - 04:186: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if [RadioActive] GoodOldPsycho that just died does not respawn, or the round ends)
    L 06/13/2004 - 04:187: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #2 (bss | Karl) is a bot and will bet...
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #3 (bss | Kloppi) is a bot and will bet...
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #4 (bss | Asche) does only have $5, which is below the $100 needed to be able to vote.
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #5 (*M*E*R*U*) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is alive and will not be able to vote.
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #7 (Too StOnEd) is alive and will not be able to vote.
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #8 (Viper) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:187: [lastmanbets.amx] Player #9 (n3x`is a pG?) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.

"already in another menu" comes very often.. this could not be (nobody without psycho is an admin which could be in another menu often)

And btw, i've set no cvar lastmanbets_overridemenus so it should be 1, but why than this message??

Could this belong to HUD Messages from other plugins?


edit:
Now i've set lastmanbets_overridemenu to 1 in amxx.cfg but still:
  • L 06/13/2004 - 04:25:29: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if J_F_K that just died does not respawn, or the round ends)
    L 06/13/2004 - 04:251: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #2 (bss | Josch) is alive and will not be able to vote.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #3 (bss | Rumpel) is alive and will not be able to vote.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #4 (bss | Molke) is a bot and will bet...
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #5 (*M*E*R*U*) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #7 (J_F_K) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #9 (n3x`is a pG?) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.

edit2:

look at psycho, plugin says he has always a menu open (but he don't) and he was not typing..
  • L 06/13/2004 - 04:251: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #2 (bss | Josch) is alive and will not be able to vote.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #3 (bss | Rumpel) is alive and will not be able to vote.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #4 (bss | Molke) is a bot and will bet...
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #5 (*M*E*R*U*) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #7 (J_F_K) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 04:251: [lastmanbets.amx] Player #9 (n3x`is a pG?) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 0410: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 0411: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 0411: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 0411: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 0411: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 0411: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:180667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 043:42: [lastmanbets.amx] Betting will maybe start in 1.000000 seconds (if [RadioActive] GoodOldPsycho that just died does not respawn, or the round ends)
    L 06/13/2004 - 043:43: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #1 ([RadioActive] GoodOldPsycho) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #2 (bss | Josch) is alive and will not be able to vote.
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #3 (bss | Rumpel) is a bot and will bet...
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #4 (bss | Molke) is a bot and will bet...
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #5 (*M*E*R*U*) is alive and will not be able to vote.
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...
    L 06/13/2004 - 043:43: [lastmanbets.amx] Player #9 (n3x`is a pG?) is already in another menu - your lastmanbets_overridemenues cvar is defined to not show bet menu to ppl who already have a menu open.
__________________
Kamikatze
visit us at http://www.popl-clan.de
Kamikatze is offline
Burnzy
Veteran Member
Join Date: Apr 2004
Old 06-12-2004 , 23:38  
Reply With Quote #10

maybe there typing... that may be an error... since a lot of dead people are typing!
__________________
Burnzy is offline
Send a message via AIM to Burnzy
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 06:15.


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