Roulette Marker movement and win coordinate
#1

I'm planning to make a Roulette Casino betting and first thing I need to do is placing players bet number
how to make script for when players presses the Left,Up,Down,Right Arrow is moving the object to the roulette number?? and how do i know the selected number.

like this one:
Reply
#2

https://sampwiki.blast.hk/wiki/Keys

You can tell where the dot is standing by recording the movements the user make. If your starting point is the number 3 and you press the down key 3 times, the dot will end standing on the number 12 (on that table)
Reply
#3

This is a lot more complicated than you would think. You will need some sort of data structure for every position on the game board example.

Код:
#define         NO_RINDEX           -1

enum ROULETTETABLEENUM {
	gRIndex,
	Float:gROffX,
	Float:gROffY,
	Float:gROffZ,
	gRUpIndex,
	gRDownIndex,
	gRRightIndex,
	gRLeftIndex,
}
There will probably be a lot more data than that.

You will also need to create system states / player states and lots of switch()'s otherwise you get into comparing system states to player states and will generate shit loads of if statements which will likely cause all sorts of logic problems for you.

Roulette is simple yet very complex if you are already having trouble with such a simple aspect of scripting this I wouldn't think you are ready to script something like this.
Reply
#4

im new on pawno can you help me mr. pottus ? thanks for advance.
Reply
#5

Quote:
Originally Posted by KingMichael
Посмотреть сообщение
im new on pawno can you help me mr. pottus ? thanks for advance.
Practice with an easier project first this is fairly advanced at least if you want a good result.
Reply
#6

Can you give me example of this coordinate of this enum. EX: gROffX, gROffY, gROffZ

and the function of the Key. thanks for advance Sir.
Reply
#7

Quote:
Originally Posted by Toroi
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/Keys

You can tell where the dot is standing by recording the movements the user make. If your starting point is the number 3 and you press the down key 3 times, the dot will end standing on the number 12 (on that table)
can you give me some example for onplayerkeystatechange
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)