AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Last man bets (https://forums.alliedmods.net/showthread.php?t=2619)

Johnny got his gun 06-11-2004 11:16

Last man bets
 
2 Attachment(s)
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)

Ingerfara 06-11-2004 11:37

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")


Johnny got his gun 06-11-2004 13:30

Thx should be fixed.

KiN | SuicideDog 06-11-2004 20:58

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

L 06/11/2004 - 16:37:34: [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 - 16:37:35: [lastmanbets.amx] Bettings will now start. This server
supports 20 players.
L 06/11/2004 - 16:37:35: [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 - 16:37:35: [lastmanbets.amx] Player #2 (BiBBy[10]) is alive and wi
ll not be able to vote.
L 06/11/2004 - 16:37:35: [lastmanbets.amx] Player #3 ([IA Bender]) is alive and
will not be able to vote.
L 06/11/2004 - 16:37:35: [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.

Johnny got his gun 06-12-2004 08:34

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.

Kamikatze 06-12-2004 13:15

Very funny plugin... :up:

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 06-12-2004 13:39

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

Should i create it manually?

Johnny got his gun 06-12-2004 14:23

Vault is autocreated by AMX.

If menu doesnt open just run debugmode and look in console why they didn't get the menu.

Kamikatze 06-12-2004 23:36

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:1:380667><>" 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:1:380667><>" 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:1:380667><>" 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:1:380667><>" 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:1:380667><>" 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:18:36: [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:18:37: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:18:37: [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:18:37: [lastmanbets.amx] Player #2 (bss | Karl) is a bot and will bet...
    L 06/13/2004 - 04:18:37: [lastmanbets.amx] Player #3 (bss | Kloppi) is a bot and will bet...
    L 06/13/2004 - 04:18:37: [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:18:37: [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:18:37: [lastmanbets.amx] Player #6 (TeamGermany|Leo) is alive and will not be able to vote.
    L 06/13/2004 - 04:18:37: [lastmanbets.amx] Player #7 (Too StOnEd) is alive and will not be able to vote.
    L 06/13/2004 - 04:18:37: [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:18:37: [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:25:31: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:25:31: [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:25:31: [lastmanbets.amx] Player #2 (bss | Josch) is alive and will not be able to vote.
    L 06/13/2004 - 04:25:31: [lastmanbets.amx] Player #3 (bss | Rumpel) is alive and will not be able to vote.
    L 06/13/2004 - 04:25:31: [lastmanbets.amx] Player #4 (bss | Molke) is a bot and will bet...
    L 06/13/2004 - 04:25:31: [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:25:31: [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:25:31: [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:25:31: [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.. :cry: :shock:
  • L 06/13/2004 - 04:25:31: [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:25:31: [lastmanbets.amx] Player #2 (bss | Josch) is alive and will not be able to vote.
    L 06/13/2004 - 04:25:31: [lastmanbets.amx] Player #3 (bss | Rumpel) is alive and will not be able to vote.
    L 06/13/2004 - 04:25:31: [lastmanbets.amx] Player #4 (bss | Molke) is a bot and will bet...
    L 06/13/2004 - 04:25:31: [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:25:31: [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:25:31: [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:25:31: [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 - 04:31:30: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:1:380667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 04:31:31: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:1:380667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 04:31:31: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:1:380667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 04:31:31: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:1:380667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 04:31:31: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:1:380667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 04:31:31: [plmenu.amx] Cmd: "[RadioActive] GoodOldPsycho<1><STEAM_0:1:380667><>" slap with 0 damage "n3x`is a pG?<22><STEAM_0:1:257265><>"
    L 06/13/2004 - 04:33: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 - 04:33:43: [lastmanbets.amx] Bettings will now start. This server supports 17 players.
    L 06/13/2004 - 04:33: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 - 04:33:43: [lastmanbets.amx] Player #2 (bss | Josch) is alive and will not be able to vote.
    L 06/13/2004 - 04:33:43: [lastmanbets.amx] Player #3 (bss | Rumpel) is a bot and will bet...
    L 06/13/2004 - 04:33:43: [lastmanbets.amx] Player #4 (bss | Molke) is a bot and will bet...
    L 06/13/2004 - 04:33:43: [lastmanbets.amx] Player #5 (*M*E*R*U*) is alive and will not be able to vote.
    L 06/13/2004 - 04:33: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 - 04:33: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.

Burnzy 06-12-2004 23:38

maybe there typing... that may be an error... since a lot of dead people are typing!


All times are GMT -4. The time now is 18:43.

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