Ulysses

General => Developers Corner => Topic started by: XxLMM13xX on April 29, 2015, 02:14:24 PM

Title: Tables Help
Post by: XxLMM13xX on April 29, 2015, 02:14:24 PM
Alright so im working on a ulx bail system for DarkRP and i would like some help with the tables!

I have a ulx bail command working! when you do !bail <player> it unarrests them! I want the cops to use a command !setbail <name> <price> and then the player that does !bail has to pay that money... the problem is setting a table to get the setbail command to log the money to the player which i don't now how to do! Please help (im bad at tables :P)
Title: Re: Tables Help
Post by: Bytewave on May 02, 2015, 11:52:48 AM
Could you explain a bit better what you're asking?
Why do you need a table for this?
Title: Re: Tables Help
Post by: JamminR on May 02, 2015, 02:19:21 PM
I'd imagine challenge to someone unfamiliar with tables being grasping the idea to begin with.
No matter where you store the bails (by file or only by memory), it can be hard to grasp.
Say, for example, bail_amounts = { <ply1>.bail_amount = 100, <ply2>.bail_amount = 150, <ply>.bail_amount = 75 }
Where <ply#> could be any unique identifier.
Not everyone is fortunate enough to understand the complex layering tables can do.
bail_amounts{2} would be 150 of course, but, not everyone may understand why.
Unfortunately, I'm not patient enough to teach.
Title: Re: Tables Help
Post by: XxLMM13xX on May 02, 2015, 02:21:59 PM
I have a friend willing to teach me so i'm good! Thanks tho!