What you need to do is define EACH spot on the board a bet can be placed then either do the following. This will let the script know exactly where to move the chips when you press a key. You can also use distance checking to see how close the stack is to the position if you don't want to define all the array references. If you are having troubles at this point I can bet you will be have a lot of other troubles later on with undefined behaviour between player and system states. These kinds of games need to be scripted a certain way to save yourself a lot of headaches.
Код:
#define ROULETTE_SPOT_UNUSED 0
#define MAX_ROULETTE_BET_PLAYSPOTS 10
enum ROULETTESPOTINFO
{
Float:g_RPosX,
Float:g_RPosY,
Float:g_RPosZ,
g_RArrayUp,
g_RArrayDown,
g_RArrayLeft,
g_RArrayRight,
}
static gRouletteData[MAX_ROULETTE_BET_PLAYSPOTS][ROULETTESPOTINFO] = {
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
{ 0.0, 0.0, 0.0, 1, 2, 3, 4 },
};