/card command to draw a random card
#21
(07-23-2019, 04:11 PM)Conn Wrote: Big +Support

Really easy to do too, something like this?



Spoiler :
Code:
-- Command to print a random playing card
cityrp.command.add("card", "b", 0, function(ply)

   local suits = {"Spades", "Clubs", "Hearts", "Diamonds"}
   local value = {"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}

   local card = table.Random(value) .. "of " .. table.Random(suits)

   -- output to players

end, "Commands", "<none>", "Picks a random card")

(basing it off Snowred's comment on https://www.fearlessrp.net/showthread.ph...light=code)




U have done the devs work for them


Messages In This Thread
/card command to draw a random card - by Zodin - 07-23-2019, 04:07 PM
RE: /card command to draw a random card - by Conn - 07-23-2019, 04:11 PM
RE: /card command to draw a random card - by Slaint - 07-24-2019, 09:15 PM
RE: /card command to draw a random card - by Ryan - 07-23-2019, 04:13 PM
RE: /card command to draw a random card - by Conn - 07-23-2019, 04:17 PM
RE: /card command to draw a random card - by Zulu - 07-24-2019, 02:24 AM
RE: /card command to draw a random card - by Forgee - 07-23-2019, 05:43 PM
RE: /card command to draw a random card - by Conn - 07-24-2019, 03:02 AM
RE: /card command to draw a random card - by Conn - 07-25-2019, 07:39 PM
RE: /card command to draw a random card - by Forgee - 07-25-2019, 07:54 PM
RE: /card command to draw a random card - by Luna - 07-25-2019, 08:48 PM
RE: /card command to draw a random card - by Luna - 07-26-2019, 01:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)