I noticed that there were no dice rolling scripts available so a good friend of mine (ZacFierce) helped me write a dice rolling script from scratch which allows you to roll dice with however many sides you want however many times you want. we also utilize 3dme (can be found at [Release] /me but the text is 3D printed) to have the text pop up above the player who rolled. The way to use the script is “/roll [sides on the die] [how many dice]” so for instance /roll 6 3 would roll 3 six sided dice.
Thank you @ZacFierce (not a fivem player just a close friend of mine who is a game developer)as well as Elio for 3dme which really brought this all together.
I also just want to add in that I appreciate this great community that offers help to people like me who are new to scripting. You all are a great help and I appreciate all of you. I hope this script is found useful for someone
oh let me also add in a warning, do not roll dice with millions of sides millions of times. That is something the script doesn’t like. but luckily it only crashes the person who does it so don’t a crazy big deal as long as its used realistically
I originally had that in and it showed up as the steam name. I couldn’t figure out the correct way to pull the RP name so I left it out. If I figure it out I will for sure re-release (edit): it does pop up above the person who rolled and only pops up in chat locally.
Thank you, that means a lot coming from you. It’s the first script I’ve worked on that is completely custom and it feels good to give back and help out with what I’ve learned from such a giving and great community.
Since most of the time people are rolling dice gambling… have you put any thought into allowing a player to start a dice group roll. Anyone that wants in and is near press E and then the script goes in order to who pressed in to tell them to roll and pays out the winner. So you don’t have situations where someone wants to roll for $1000 but only has $1 in cash
It is something I have been thinking about but since you have most of the code done … using server script to network anyone in game shouldn’t be that hard.
ill get working on it shortly. I apologize. have had lots coming up personally lately. I really do want to add that in because I think itll make a great addition
Right but lets say I roll a 69 sided dice 5 times instead of getting the random numbers between 1-69 then adding them, im suggesting (maybe even make it a config option) to display the results of the roles individually like 3/69 52/69/ 14/69 32/69 24/69 as an example, then you can see the results of each roll. Obviously if you do a lot of rolls it would be a lot to display but I think its could have more RP potential to show each roll individually.
Alternatively if you didnt want to put it in your code do you have any idea how I could alter it to display in that way?