SA-MP Forums Archive
[How To]Poker / Texas Hold'em System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [How To]Poker / Texas Hold'em System (/showthread.php?tid=112228)



[How To]Poker / Texas Hold'em System - rhkdgml2 - 06.12.2009

greetings.
don't care my nickname, it's... little wierdo.

just call me Khaki.

my question is.

How to make a Poker system in pawno?
i try and try but couldn't figure out, so i writing this topic.

i just did

new Deck[4][13];

this is the Poker deck.
which [4] is meaning Suit(Spade,Clover,Heart,Diamond)
and [13] is meaning Number(2~10,J,Q,K,Ace)

1, how can i define this suit for each number ?

and another one, 2, how can i shuffle this?

i got more question

how can i distribute this card for player(3~5) and no overlapped card

all i need is just figure this problems out


sorry ma bad eng. i'm korean
so i hope you answer under this topic.

Thank you



Re: [How To]Poker / Texas Hold'em System - DeathOnaStick - 06.12.2009

1.)
pawn Код:
#define Spade 1
#define Clover 2
#define Heart 3
#define Diamond 4

#define Ace 1
#define Joker 11
#define Queen 12
#define King 13
That's how it should work...

2.) For shuffling just use "random('Number')"

3.) For checking if its overlapped... well... maybe you need to make values into the array... maybe playerid's...

Example:

pawn Код:
Deck[Heart][Ace]=playerid;
Then you just need to check if the array has a value...

Cheers.