Hello everyone,
Thank you Sami37 for your plugin. it works fine on my server.
But I'm trying to change the color of the 'wins' and 'lose' messages in the lottery.cs file, but since I'm not a developer, obviously I can not.
Here is what I tried.
string.Format(lang.GetMessage(color(#cc0000), "NoWin", this, arg.Player().UserIDString), random));
An idea to reach my goal ?
In addition, I notice that the player wins 2 out of 10.
Is there a way to increase this ratio ?
Thank you in advance for the help
Lottery
Moved
Total Downloads: 1,456 - First Release: Sep 21, 2016 - Last Update: Jul 25, 2018
- 5/5, 12 likes
-
Code:
"NoWin": "<color=red>You roll {0} </color><color=green>but don't win anything.</color>"
So i guess if you want to give more chance to your player, you may reduce this interval, by default it's 1000 ~ 9999, by reducing the interval you increase the chance. But you can also add more roll match to the list that will also increase the chance of winning something. -
Thank you very much Sami.
-
Sami,
The plugin works. I do not see any problem in game.
But yet I have these errors on the server when a player plays the lottery.
What do you think ? -
Here is the isolated message when a player place bet
Code:Failed to call hook 'cmdPlaceBet' on plugin 'Lottery v1.2.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.Lottery.ShowSrLotery (BasePlayer player, System.String[] args) [0x00000] in <2faa1ec6d900482593984c0d66ded9e4>:0 at Oxide.Plugins.Lottery.cmdPlaceBet (ConsoleSystem+Arg arg) [0x009ba] in <2faa1ec6d900482593984c0d66ded9e4>:0 at Oxide.Plugins.Lottery.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00564] in <2faa1ec6d900482593984c0d66ded9e4>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <4de2a9f5b1eb4f0ea3c4c9778603446d>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bfa4e457157d4e089ab91719c5b1288b>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bfa4e457157d4e089ab91719c5b1288b>:0
UPDATE : in my config: ''Place Bet Auto-close": true,Last edited by a moderator: Jul 22, 2018 -
-
Thank you Samy.
The errors messages have disappeared
But another problem appears.
If the player bets too much, he can not reset.
And if he comes out of the Lottery game, and come back his bet stays the same on his return.
No reset
-
-
-
Thanks Sami
We are almost there ;-)
The reset button works. But then the message 'Server Rewards isn't installed' is displayed.
I only use Economics. -
-
same problem
-
-
one word : Perfect
-
i have no idea how to give myself permission to use this i am the owner of my server