Casino and Mod Garage
#1

How do I do this [ame]http://www.youtube.com/watch?v=trRihY3zxQ0[/ame] it's a complete script or no?
As for the Casino how to activate poker machines, jackpots, roulette table.

Sorry for bad English.
Reply
#2

For the tuning, the best you could do is create a command called /tune. That command would check If the car can be modded or not, and if it can, in which garage. Luckily, there's one of these already:

Quote:
PHP код:
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
/*CreateObject(971, 2644.538086, -2039.156250, 12.855463, 0.0000, 0.0000, 0.0000);
CreateObject(971, 1042.446411, -1026.004761, 31.101563, 0.0000, 0.0000, 0.0000);
CreateObject(971, -2716.016113, 217.545639, 3.295407, 0.0000, 0.0000, 269.7591);*/
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define GREEN         0x21DD00FF
#define RED         0xE60000FF
#define ADMIN_RED     0xFB0000FF
#define YELLOW         0xFFFF00FF
#define ORANGE         0xF97804FF
#define LIGHTRED     0xFF8080FF
#define LIGHTBLUE     0x00C2ECFF
#define PURPLE         0xB360FDFF
#define BLUE         0x1229FAFF
#define LIGHTGREEN     0x38FF06FF
#define DARKPINK    0xE100E1FF
#define DARKGREEN     0x008040FF
#define AQUAGREEN    0x00CACAFB
#define NICESKY     0x99FFFFAA
#define GREY         0xCECECEFF
#define WHITE         0xFFFFFFFF
new Float:qFloat:wFloat:e;
new 
tune1;
new 
tune2;
forward tunea(playerid);
forward tuneb(playerid);
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    
    
    
CreateObject(9712644.538086, -2039.15625012.8554630.00000.00000.0000);
    
CreateObject(9711042.446411, -1026.00476131.1015630.00000.00000.0000);
    
CreateObject(971, -2716.016113217.5456393.2954070.00000.0000269.7591);
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
if(
strcmp(cmdtext,"/tune"true) == 0)
     {
    new 
vehicleid GetPlayerVehicleID(playerid);
    if(!
IsPlayerInTransfenderVehicle(playeridvehicleid))
    {
        
GetPlayerPos(playeridqwe);
        
SetPlayerVirtualWorld(playerid,playerid+1);
        
SetVehiclePos(vehicleid,1041.1611,-1020.1884,31.9751);
        
SetVehicleZAngle(vehicleid359.6632);
        
SetVehicleVirtualWorld(vehicleidplayerid+1);
           
tune1 SetTimer("tunea",1000,true);
        
SendClientMessage(playeridPURPLE"When you are finished modifying your car please exit the garage");
    }
    else if(!
IsPlayerInLocolowVehicle(playeridvehicleid))
    {
        
GetPlayerPos(playeridqwe);
        
SetPlayerVirtualWorld(playerid,playerid+1);
        
SetVehiclePos(vehicleid,2644.7661,-2042.4143,13.2611);
        
SetVehicleZAngle(vehicleid178.4298);
        
SetVehicleVirtualWorld(vehicleidplayerid+1);
        
tune1 SetTimer("tunea",1000,true);
        
SendClientMessage(playeridPURPLE"When you are finished modifying your car please exit the garage");
    }
    else if(!
IsPlayerInWAAVehicle(playeridvehicleid))
    {
        
GetPlayerPos(playeridqwe);
        
SetPlayerVirtualWorld(playerid,playerid+1);
        
SetVehiclePos(vehicleid,-2721.9834,217.1915,4.3515);
        
SetVehicleZAngle(vehicleid92.3493);
        
SetVehicleVirtualWorld(vehicleidplayerid+1);
        
tune1 SetTimer("tunea",1000,true);
        
SendClientMessage(playeridPURPLE"When you are finished modifying your car please exit the garage");
    }
    else
    {
    
SendClientMessage(playeridRED"You are either not in a vehicle or not in a vehicle that can be modded");
    }
    return 
1;
    }
return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    if(!
IsPlayerInTransfenderVehicle(playeridvehicleid))
    {
    
SendClientMessage(playeridPURPLE"Type /tune to mod your vehicle, when finished you will be brought back to your location!");
    }
    else if(!
IsPlayerInLocolowVehicle(playeridvehicleid))
    {
     
SendClientMessage(playeridPURPLE"Type /tune to mod your vehicle, when finished you will be brought back to your location!");
    }
    else if(!
IsPlayerInWAAVehicle(playeridvehicleid))
    {
    
SendClientMessage(playeridPURPLE"Type /tune to mod your vehicle, when finished you will be brought back to your location!");
    }
    return 
1;
}
IsPlayerInTransfenderVehicle(playerid,vehicleid)
{
    
#define MAX_VALID_TRANSFENDER_VEHICLES 65
    
new InTransfenderVehicle[MAX_VALID_TRANSFENDER_VEHICLES] =
    {
    
400,401,402,404,405,409,410,411,415,418,419,420,421,422,424,426,436,438,439,
    
442,445,451,458,466,467,474,475,477,478,479,480,489,491,492,496,500,505,506,
    
507,516,517,518,527,526,529,533,540,541,542,545,546,547,549,550,551,555,575,
    
579,580,585,587,589,600,602,603
    
};
    
vehicleid GetPlayerVehicleID(playerid);
    if(
IsPlayerInVehicle(playerid,vehicleid))
    {
        for(new 
0MAX_VALID_TRANSFENDER_VEHICLESi++)
        {
            if(
GetVehicleModel(vehicleid) == InTransfenderVehicle[i])
            {
                return 
0;
            }
        }
    }
    return 
1;
}
IsPlayerInLocolowVehicle(playerid,vehicleid)
{
    
#define MAX_VALID_LOCOLOW_VEHICLES 7
    
new InLocolowVehicle[MAX_VALID_LOCOLOW_VEHICLES] =
    {
    
412,534,535,536,566,567,576
    
};
    
vehicleid GetPlayerVehicleID(playerid);
    if(
IsPlayerInVehicle(playerid,vehicleid))
    {
        for(new 
0MAX_VALID_LOCOLOW_VEHICLESi++)
        {
            if(
GetVehicleModel(vehicleid) == InLocolowVehicle[i])
            {
                return 
0;
            }
        }
    }
    return 
1;
}
IsPlayerInWAAVehicle(playerid,vehicleid)
{
    
#define MAX_VALID_WAA_VEHICLES 6
    
new InWAAVehicle[MAX_VALID_WAA_VEHICLES] =
    {
    
558,559,560,561,562,565
    
};
    
vehicleid GetPlayerVehicleID(playerid);
    if(
IsPlayerInVehicle(playerid,vehicleid))
    {
        for(new 
0MAX_VALID_WAA_VEHICLESi++)
        {
            if(
GetVehicleModel(vehicleid) == InWAAVehicle[i])
            {
                return 
0;
            }
        }
    }
    return 
1;
}
public 
tunea(playerid)
{
    if (
PlayerToPoint(20playerid,617.5380,-1.9900,1000.6829))
      {
      
tune2 SetTimer("tuneb",1000,true);
      }
      else if (
PlayerToPoint(20playerid,616.7820,-74.8151,997.6350))
      {
      
tune2 SetTimer("tuneb",1000,true);
      }
      else if (
PlayerToPoint(20playerid,615.2851,-124.2390,997.6350))
      {
    
tune2 SetTimer("tuneb",1000,true);
      }
    return 
1;
}
public 
tuneb(playerid)
{
    
KillTimer(tune1);
    new 
vehicleid GetPlayerVehicleID(playerid);
    if (
PlayerToPoint(20playerid,1041.1611,-1020.1884,31.9751))
      {
      
KillTimer(tune1);
      
SetVehiclePos(vehicleidqwe);
      
SetPlayerVirtualWorld(playerid,0);
      
SetVehicleVirtualWorld(vehicleid0);
      
KillTimer(tune2);
      }
      else if (
PlayerToPoint(20playerid,-2721.9834,217.1915,4.3515))
      {
      
KillTimer(tune1);
      
SetVehiclePos(vehicleidqwe);
      
SetPlayerVirtualWorld(playerid,0);
      
SetVehicleVirtualWorld(vehicleid0);
      
KillTimer(tune2);
      }
      else if (
PlayerToPoint(20playerid,2644.7661,-2042.4143,13.2611))
      {
      
KillTimer(tune1);
      
SetVehiclePos(vehicleidqwe);
      
SetPlayerVirtualWorld(playerid,0);
      
SetVehicleVirtualWorld(vehicleid0); //KillTimer()
      
KillTimer(tune2);
      }
    return 
1;
}
PlayerToPoint(Float:radiusplayeridFloat:XFloat:YFloat:Z)
{
    new 
Float:oldpos[3], Float:temppos[3];
    
GetPlayerPos(playeridoldpos[0], oldpos[1], oldpos[2]);
    
temppos[0] = (oldpos[0] -X);
    
temppos[1] = (oldpos[1] -Y);
    
temppos[2] = (oldpos[2] -Z);
    if(((
temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
    {
        return 
true;
    }
    return 
false;
}
#endif 
As for the slot machines, you can't enable them, however there are some good FS around. I'm posting two here:

Quote:
PHP код:
//                                                                               |
//     You can change/edit the colours of the messages shown to a player,        |
//             but please keep the credits and leave the code as it is           |
//                                                                               |
//                 This Filterscript has been created by:                        |
//                                                                               |
//                                                                               |
//                         _____           _     _                                 |
//                        |  __ \         | |   (_)                                |
//                        | |  | |_ __ ___| |__  _ _ __                            |
//                        | |  | | '__/ _ \ '_ \| | '_ \                           |
//                        | |__| | | |  __/ |_) | | | | |                          |
//                        |_____/|_|  \___|_.__/|_|_| |_|                          |
//                                                                               |
//                                   © 2012                                      |
//                                                                               |
//                                                                               |
//_______________________________________________________________________________|
#define FILTERSCRIPT
#include <a_samp>
//================================================================================================================================================
//====================================DEFINES=(you can change the values of you want to===========================================================
//================================================================================================================================================
#define DIALOG_STARTGAMBLE    1893    //    DialogID of the dialog shown when a player types /gamble
#define DIALOG_STOPGAMBLE    1894    //  DialogID of the dialog shown when a player types /stopgamble
#define GAMBLE_WAGER        5       //  Amount of money a player has to pay whenever he spins the slot machine (wager)
#define REWARD_DOUBLEBAR    999     //  Amount of money a player recieves when he has 3x the double goldbars (Should be highest value)
#define REWARD_BAR            888     //  Amount of money a player recieves when he has 3x the single goldbar
#define REWARD_BELL            777     //  Amount of money a player recieves when he has 3x the gold bell
#define REWARD_CHERRY        666     //  Amount of money a player recieves when he has 3x the cherry
#define REWARD_GRAPES        555     //  Amount of money a player recieves when he has 3x the grapes
#define REWARD_SIXTYNINE    444     //  Amount of money a player recieves when he has 3x the 69 (Should be lowest value)
//================================================================================================================================================
//=================================END OF DEFINES=================================================================================================
//================================================================================================================================================
//--------------------------------------------Do not change any of the values below!--------------------------------------------------------------
new LeftSpinner;
new 
MiddleSpinner;
new 
RightSpinner;
new 
GamblingMachine;
new 
Float:ZOff 0.0005;
new 
PreSpinTimer;
new 
SymbolSL,SymbolSM,SymbolSR;
new 
Float:pXFloat:pYFloat:pZ;
new 
Text3D:GambleLabel[22];
new 
Float:Rotations[18] = {0.020.040.060.080.0100.0120.0140.0160.0180.0200.0220.0240.0260.0280.0300.0320.0340.0};
new 
ResultIDsLeft[18] = {231465654341653546};
new 
ResultIDsMiddle[18] = {346524564153616345};
new 
ResultIDsRight[18] = {563454356126435146};
new 
ResultNames[][] =
{
    
"ld_slot:bar1_o",
    
"ld_slot:bar2_o",
    
"ld_slot:r_69",
    
"ld_slot:bell",
    
"ld_slot:grapes",
    
"ld_slot:cherry"
};
new 
bool:IsGambling[MAX_PLAYERS];
new 
bool:movedup false;
new 
bool:IsSpinning[MAX_PLAYERS] = false;
new 
Float:BanditLocs[22][4] =
{
    {
2218.6675,1617.8453,1006.1818},
    {
2218.6365,1615.4679,1006.1797},
    {
2218.6467,1613.5095,1006.1797},
    {
2221.9204,1603.9452,1006.1797},
    {
2219.9626,1603.9191,1006.1797},
    {
2218.2646,1603.9263,1006.1797},
    {
2216.3064,1603.8970,1006.1819},
    {
2218.6538,1593.6243,1006.1797},
    {
2218.6699,1591.6659,1006.1859},
    {
2218.6367,1589.3187,1006.1841},
    {
2218.6531,1587.3612,1006.1827},
    {
2255.1624,1608.8839,1006.1860},
    {
2255.1670,1610.8419,1006.1797},
    {
2255.1726,1612.9315,1006.1797},
    {
2255.1494,1614.8890,1006.1797},
    {
2255.1453,1616.8290,1006.1797},
    {
2255.1399,1618.7893,1006.1797},
    {
2268.5322,1606.6649,1006.1797},
    {
2270.4905,1606.6846,1006.1797},
    {
2272.5798,1606.6464,1006.1797},
    {
2274.5374,1606.6764,1006.1797},
    {
2218.6458,1619.8035,1006.1794}
};
enum tDraws
{
    
Text:Textdraw0,
    
Text:Textdraw1,
    
Text:Textdraw2,
    
Text:Textdraw3,
    
Text:Textdraw4,
    
Text:Textdraw5,
    
Text:Textdraw6,
    
Text:Textdraw7,
    
Text:Textdraw8,
    
Text:Textdraw9,
    
Text:Textdraw10,
    
Text:Textdraw11,
    
Text:Textdraw12,
    
Text:Textdraw13,
    
Text:Textdraw14,
    
Text:Textdraw15,
    
Text:Textdraw16,
    
Text:Textdraw17,
    
Text:Textdraw18,
    
Text:Textdraw19,
    
Text:Textdraw20,
    
Text:Textdraw21,
    
Text:Textdraw22,
    
Text:Textdraw23,
    
Text:Textdraw24,
    
Text:Textdraw25,
    
Text:Textdraw26,
    
Text:Textdraw27,
    
Text:Textdraw28,
    
Text:Textdraw29,
    
Text:Textdraw30,
    
Text:Textdraw31,
    
Text:Textdraw32,
    
Text:Textdraw33,
    
Text:Textdraw34,
    
Text:Textdraw35,
    
Text:Textdraw36,
    
Text:Textdraw37,
    
TotalWon,
    
TotalPaid,
    
TotalTotal
}
new 
PlayerEnum[MAX_PLAYERS][tDraws];
forward SpinSpinners(playerid);
forward Prespin(playerid);
forward GiveResult(playerid);
forward SetPlayerWonPaid(playerid);
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
"SlotMachines 1.0 by Drebin ©2012");
    print(
"--------------------------------------\n");
    
GamblingMachine CreateObject(23252236.61721600.94791000.6591 ,   0.000.00, -90.00);
    for(new 
0sizeof(BanditLocs); i++)
    {
        
GambleLabel[i] = Create3DTextLabel("Slot Machine\n type {0087FF}/gamble {FFFFFF}to\nstart gambling!"0xFFFFFFFFBanditLocs[i][0], BanditLocs[i][1], BanditLocs[i][2], 4.000);
    }
    return 
1;
}
public 
OnFilterScriptExit()
{
    
DestroyObject(GamblingMachine);
    for(new 
0sizeof(BanditLocs); i++)
    {
        
Delete3DTextLabel(GambleLabel[i]);
    }
    return 
1;
}
#endif
public OnPlayerConnect(playerid)
{
    
PlayerEnum[playerid][TotalWon] = 0;
    
PlayerEnum[playerid][TotalPaid] = 0;
    
PlayerEnum[playerid][TotalTotal] = 0;
    
LeftSpinner CreatePlayerObject(playerid23472236.60721601.04791000.6791,   5.000.00, -90.00);
    
MiddleSpinner CreatePlayerObject(playerid23482236.60721600.92791000.6791,   5.000.00, -90.00);
    
RightSpinner CreatePlayerObject(playerid23492236.60721600.80791000.6791,   5.000.00, -90.00);
    new 
doublebar[16], bar[16], bell[16], cherry[16], grapes[16], sixtynine[16], wager[16];
    
format(doublebar,sizeof(doublebar),"= $%i",REWARD_DOUBLEBAR);
    
format(bar,sizeof(bar),"= $%i",REWARD_BAR);
    
format(bell,sizeof(bell),"= $%i",REWARD_BELL);
    
format(cherry,sizeof(cherry),"= $%i",REWARD_CHERRY);
    
format(grapes,sizeof(grapes),"= $%i",REWARD_GRAPES);
    
format(sixtynine,sizeof(sixtynine),"= $%i",REWARD_SIXTYNINE);
    
format(wager,sizeof(wager),"~y~Wager = $%i"GAMBLE_WAGER);
    
PlayerEnum[playerid][Textdraw0] = TextDrawCreate(563.000000163.000000"~n~");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw0], 2);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw0], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw0], 1);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw0], 0.50000017.700006);
    
TextDrawColor(PlayerEnum[playerid][Textdraw0], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw0], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw0], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw0], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw0], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw0], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw0], 22.000000140.000000);
    
PlayerEnum[playerid][Textdraw1] = TextDrawCreate(319.000000326.000000"~n~");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw1], 2);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw1], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw1], 1);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw1], 2.25000010.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw1], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw1], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw1], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw1], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw1], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw1], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw1], -22.000000340.000000);
    
PlayerEnum[playerid][Textdraw2] = TextDrawCreate(179.000000329.000000"ld_slot:r_69");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw2], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw2], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw2], 0.460000, -1.500000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw2], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw2], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw2], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw2], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw2], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw2], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw2], 90.00000069.000000);
    
PlayerEnum[playerid][Textdraw3] = TextDrawCreate(274.000000329.000000"ld_slot:r_69");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw3], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw3], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw3], 0.460000, -1.500000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw3], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw3], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw3], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw3], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw3], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw3], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw3], 90.00000069.000000);
    
PlayerEnum[playerid][Textdraw4] = TextDrawCreate(369.000000329.000000"ld_slot:r_69");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw4], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw4], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw4], 0.460000, -1.500000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw4], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw4], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw4], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw4], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw4], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw4], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw4], 90.00000069.000000);
    
PlayerEnum[playerid][Textdraw5] = TextDrawCreate(206.000000381.000000"YOU WON!");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw5], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw5], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw5], 1.1000004.099998);
    
TextDrawColor(PlayerEnum[playerid][Textdraw5], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw5], 1);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw5], 1);
    
PlayerEnum[playerid][Textdraw6] = TextDrawCreate(493.000000169.000000"ld_slot:bar2_o");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw6], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw6], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw6], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw6], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw6], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw6], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw6], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw6], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw6], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw6], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw7] = TextDrawCreate(518.000000169.000000"ld_slot:bar2_o");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw7], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw7], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw7], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw7], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw7], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw7], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw7], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw7], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw7], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw7], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw8] = TextDrawCreate(543.000000169.000000"ld_slot:bar2_o");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw8], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw8], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw8], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw8], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw8], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw8], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw8], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw8], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw8], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw8], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw9] = TextDrawCreate(493.000000186.000000"ld_slot:bar1_o");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw9], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw9], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw9], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw9], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw9], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw9], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw9], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw9], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw9], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw9], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw10] = TextDrawCreate(518.000000186.000000"ld_slot:bar1_o");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw10], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw10], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw10], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw10], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw10], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw10], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw10], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw10], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw10], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw10], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw11] = TextDrawCreate(543.000000186.000000"ld_slot:bar1_o");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw11], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw11], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw11], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw11], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw11], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw11], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw11], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw11], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw11], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw11], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw12] = TextDrawCreate(493.000000203.000000"ld_slot:bell");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw12], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw12], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw12], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw12], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw12], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw12], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw12], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw12], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw12], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw12], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw13] = TextDrawCreate(518.000000203.000000"ld_slot:bell");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw13], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw13], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw13], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw13], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw13], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw13], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw13], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw13], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw13], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw13], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw14] = TextDrawCreate(543.000000203.000000"ld_slot:bell");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw14], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw14], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw14], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw14], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw14], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw14], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw14], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw14], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw14], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw14], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw15] = TextDrawCreate(493.000000220.000000"ld_slot:cherry");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw15], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw15], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw15], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw15], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw15], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw15], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw15], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw15], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw15], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw15], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw16] = TextDrawCreate(518.000000220.000000"ld_slot:cherry");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw16], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw16], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw16], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw16], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw16], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw16], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw16], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw16], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw16], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw16], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw17] = TextDrawCreate(543.000000220.000000"ld_slot:cherry");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw17], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw17], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw17], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw17], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw17], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw17], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw17], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw17], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw17], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw17], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw18] = TextDrawCreate(493.000000237.000000"ld_slot:grapes");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw18], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw18], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw18], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw18], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw18], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw18], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw18], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw18], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw18], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw18], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw19] = TextDrawCreate(518.000000237.000000"ld_slot:grapes");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw19], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw19], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw19], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw19], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw19], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw19], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw19], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw19], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw19], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw19], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw20] = TextDrawCreate(543.000000237.000000"ld_slot:grapes");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw20], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw20], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw20], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw20], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw20], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw20], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw20], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw20], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw20], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw20], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw21] = TextDrawCreate(493.000000255.000000"ld_slot:r_69");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw21], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw21], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw21], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw21], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw21], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw21], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw21], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw21], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw21], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw21], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw22] = TextDrawCreate(518.000000255.000000"ld_slot:r_69");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw22], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw22], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw22], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw22], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw22], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw22], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw22], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw22], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw22], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw22], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw23] = TextDrawCreate(543.000000255.000000"ld_slot:r_69");
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw23], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw23], 4);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw23], 0.5000001.000000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw23], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw23], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw23], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw23], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw23], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw23], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw23], 25.00000020.000000);
    
PlayerEnum[playerid][Textdraw24] = TextDrawCreate(573.000000253.000000sixtynine);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw24], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw24], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw24], 0.2900001.700000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw24], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw24], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw24], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw24], 1);
    
PlayerEnum[playerid][Textdraw25] = TextDrawCreate(573.000000236.000000grapes);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw25], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw25], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw25], 0.2900001.700000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw25], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw25], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw25], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw25], 1);
    
PlayerEnum[playerid][Textdraw26] = TextDrawCreate(573.000000219.000000cherry);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw26], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw26], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw26], 0.2900001.700000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw26], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw26], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw26], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw26], 1);
    
PlayerEnum[playerid][Textdraw27] = TextDrawCreate(573.000000202.000000bell);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw27], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw27], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw27], 0.2900001.700000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw27], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw27], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw27], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw27], 1);
    
PlayerEnum[playerid][Textdraw28] = TextDrawCreate(573.000000185.000000bar);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw28], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw28], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw28], 0.2900001.700000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw28], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw28], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw28], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw28], 1);
    
PlayerEnum[playerid][Textdraw29] = TextDrawCreate(573.000000168.000000doublebar);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw29], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw29], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw29], 0.2900001.700000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw29], 1694458980);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw29], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw29], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw29], 1);
    
PlayerEnum[playerid][Textdraw30] = TextDrawCreate(496.000000281.000000wager);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw30], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw30], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw30], 0.4399992.800000);
    
TextDrawColor(PlayerEnum[playerid][Textdraw30], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw30], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw30], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw30], 1);
    
    
PlayerEnum[playerid][Textdraw31] = TextDrawCreate(563.000000327.000000"~n~");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw31], 2);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw31], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw31], 1);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw31], 0.50000010.700002);
    
TextDrawColor(PlayerEnum[playerid][Textdraw31], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw31], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw31], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw31], 1);
    
TextDrawUseBox(PlayerEnum[playerid][Textdraw31], 1);
    
TextDrawBoxColor(PlayerEnum[playerid][Textdraw31], 255);
    
TextDrawTextSize(PlayerEnum[playerid][Textdraw31], 22.000000140.000000);
    
PlayerEnum[playerid][Textdraw32] = TextDrawCreate(629.000000342.000000"~w~won:   ~g~$0");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw32], 3);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw32], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw32], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw32], 0.3099971.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw32], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw32], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw32], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw32], 1);
    
PlayerEnum[playerid][Textdraw33] = TextDrawCreate(629.000000352.000000"-------------------------");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw33], 3);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw33], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw33], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw33], 0.3099971.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw33], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw33], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw33], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw33], 1);
    
PlayerEnum[playerid][Textdraw34] = TextDrawCreate(629.000000363.000000"~w~total:    ~y~$0");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw34], 3);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw34], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw34], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw34], 0.3099971.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw34], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw34], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw34], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw34], 1);
    
PlayerEnum[playerid][Textdraw35] = TextDrawCreate(629.000000328.000000"~w~paid:    ~r~$0");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw35], 3);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw35], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw35], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw35], 0.3099971.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw35], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw35], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw35], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw35], 1);
    
PlayerEnum[playerid][Textdraw36] = TextDrawCreate(631.000000408.000000"~w~Stop: ~b~/stopgamble");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw36], 3);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw36], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw36], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw36], 0.3099971.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw36], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw36], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw36], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw36], 1);
    
PlayerEnum[playerid][Textdraw37] = TextDrawCreate(585.000000394.000000"~w~Spin: ~b~~k~~VEHICLE_ENTER_EXIT~");
    
TextDrawAlignment(PlayerEnum[playerid][Textdraw37], 3);
    
TextDrawBackgroundColor(PlayerEnum[playerid][Textdraw37], 255);
    
TextDrawFont(PlayerEnum[playerid][Textdraw37], 2);
    
TextDrawLetterSize(PlayerEnum[playerid][Textdraw37], 0.3099971.799999);
    
TextDrawColor(PlayerEnum[playerid][Textdraw37], -1);
    
TextDrawSetOutline(PlayerEnum[playerid][Textdraw37], 0);
    
TextDrawSetProportional(PlayerEnum[playerid][Textdraw37], 1);
    
TextDrawSetShadow(PlayerEnum[playerid][Textdraw37], 1);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/gamble"true))
    {
        for(new 
0i<sizeof(BanditLocs); i++)
        {
            if(
IsPlayerInRangeOfPoint(playerid,1.0,BanditLocs[i][0],BanditLocs[i][1], BanditLocs[i][2]))
            {
                if(
IsGambling[playerid] == false//If player isn't gambling
                
{
                    
ShowPlayerDialog(playerid,DIALOG_STARTGAMBLE,DIALOG_STYLE_MSGBOX,"Start Gambling","Do you really want to start gambling?","Yes","No");
                    return 
1;
                }else return 
SendClientMessage(playerid,0xFF0000FF,"You can't use this command now since you are already gambling!");
               }
            else if(!
IsPlayerInRangeOfPoint(playerid,1.0,BanditLocs[i][0],BanditLocs[i][1], BanditLocs[i][2]) && == sizeof(BanditLocs) - 1)
             {
                 
SendClientMessage(playerid,0xFF0000FF,"You can't use this command now since you're not close enough to any slot machine.");
            }
        }
        return 
1;
    }
    if(!
strcmp(cmdtext"/stopgamble"true))
    {
        if(
IsGambling[playerid] == true)
        {
            if(
IsSpinning[playerid] == false)
            {
                
ShowPlayerDialog(playerid,DIALOG_STOPGAMBLE,DIALOG_STYLE_MSGBOX,"Stop Gambling","Do you really want to stop gambling?","Yes","No");
            }else return 
SendClientMessage(playerid,0xFF0000FF,"You can't stop now since the slot machine is still running. Please wait unti it's finished.");
        }else return 
SendClientMessage(playerid,0xFF0000FF,"You can't use this command now since you're currently not gambling");
        return 
1;
    }
    return 
0;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if((
newkeys KEY_SECONDARY_ATTACK) && !(oldkeys KEY_SECONDARY_ATTACK)) //If player presses ENTER
    
{
        if(
IsGambling[playerid] == true)
        {
            if(
IsSpinning[playerid] == false)
            {
                if(
GetPlayerMoney(playerid) >= GAMBLE_WAGER)
                {
                    
PlayerEnum[playerid][TotalPaid] = PlayerEnum[playerid][TotalPaid] + GAMBLE_WAGER;
                    
GivePlayerMoney(playerid,GAMBLE_WAGER GAMBLE_WAGER*2);
                    
IsSpinning[playerid] = true;
                    
PreSpinTimer SetTimer("Prespin"100true);
                    
SetTimer("SpinSpinners"3000false);
                    
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw2]);
                    
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw3]);
                    
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw4]);
                    
TextDrawHideForPlayer(playeridPlayerEnum[playerid][Textdraw5]);
                    if(
GetPlayerMoney(playerid) < GAMBLE_WAGER)
                    {
                        new 
wager[16];
                        
format(wager,sizeof(wager),"~r~Wager = $%i"GAMBLE_WAGER);
                        
TextDrawSetString(PlayerEnum[playerid][Textdraw30],wager);
                    }
                    else
                    {
                        new 
wager[16];
                        
format(wager,sizeof(wager),"~y~Wager = $%i"GAMBLE_WAGER);
                        
TextDrawSetString(PlayerEnum[playerid][Textdraw30],wager);
                    }
                    new 
doublebar[16], bar[16], bell[16], cherry[16], grapes[16], sixtynine[16];
                    
format(doublebar,sizeof(doublebar),"= $%i",REWARD_DOUBLEBAR);
                    
format(bar,sizeof(bar),"= $%i",REWARD_BAR);
                    
format(bell,sizeof(bell),"= $%i",REWARD_BELL);
                    
format(cherry,sizeof(cherry),"= $%i",REWARD_CHERRY);
                    
format(grapes,sizeof(grapes),"= $%i",REWARD_GRAPES);
                    
format(sixtynine,sizeof(sixtynine),"= $%i",REWARD_SIXTYNINE);
                    
TextDrawSetString(PlayerEnum[playerid][Textdraw29],doublebar);
                    
TextDrawSetString(PlayerEnum[playerid][Textdraw28],bar);
                    
TextDrawSetString(PlayerEnum[playerid][Textdraw24],sixtynine);
                    
TextDrawSetString(PlayerEnum[playerid][Textdraw27],bell);
                    
TextDrawSetString(PlayerEnum[playerid][Textdraw25],grapes);
                    
TextDrawSetString(PlayerEnum[playerid][Textdraw26],cherry);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw29]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw28]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw24]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw27]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw25]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw26]);
                    
SetPlayerWonPaid(playerid);
                }
                else return 
SendClientMessage(playerid,0xFF0000FF,"You can not gamble anymore, you don't have enough money to pay the wager!");
            }else return 
SendClientMessage(playerid,0xFF0000FF,"You can't spin again yet, the machine is still running. Wait until the draw is finished.");
        }
    }
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_STARTGAMBLE:
        {
            if(
response//If player pressed the first ("Yes") button
            
{
                if(
GetPlayerMoney(playerid) >= GAMBLE_WAGER)
                {
                    
IsGambling[playerid] = true;
                    
PlayerEnum[playerid][TotalPaid] = 0;
                    
PlayerEnum[playerid][TotalWon] = 0;
                    
PlayerEnum[playerid][TotalTotal] = 0;
                    
TogglePlayerControllable(playerid,0);
                    
GetPlayerPos(playerid,pX,pY,pZ);
                    
SetPlayerPos(playerid,2221.9514,1619.6721,1006.1836);
                    
SetPlayerCameraPos(playerid,2235.90721600.92791000.8791);
                    
SetPlayerCameraLookAt(playerid,2236.60721600.92791000.6791);
                    
SetPlayerWonPaid(playerid);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw0]); //black box side
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw1]); //Black box bottom
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw6]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw7]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw8]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw9]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw10]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw11]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw12]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw13]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw14]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw15]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw16]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw17]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw18]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw19]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw20]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw21]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw22]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw23]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw24]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw25]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw26]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw27]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw28]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw29]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw30]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw31]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw32]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw33]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw34]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw35]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw36]);
                    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw37]);
                }
                else
                {
                    
SendClientMessage(playerid,0xFF0000FF,"You do not have enough money to pay the wager. You can not gamble right now.");
                }
                return 
1;
            }
        }
        case 
DIALOG_STOPGAMBLE:
        {
            if(
response//If player pressed the first ("Yes") button
            
{
                
IsGambling[playerid] = false;
                
TogglePlayerControllable(playerid,1);
                
SetPlayerPos(playerid,pX,pY,pZ);
                
SetCameraBehindPlayer(playerid);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw0]); //black box side
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw1]); //Black box bottom
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw2]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw3]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw4]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw5]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw6]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw7]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw8]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw9]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw10]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw11]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw12]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw13]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw14]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw15]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw16]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw17]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw18]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw19]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw20]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw21]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw22]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw23]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw24]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw25]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw26]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw27]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw28]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw29]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw30]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw31]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw32]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw33]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw34]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw35]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw36]);
                
TextDrawHideForPlayer(playerid,PlayerEnum[playerid][Textdraw37]);
                return 
1;
            }
        }
    }
    return 
1;
}
public 
Prespin(playerid)
{
    new 
Float:rxLFloat:ryLFloat:rzL;
    new 
Float:rxMFloat:ryMFloat:rzM;
    new 
Float:rxRFloat:ryRFloat:rzR;
    
GetPlayerObjectRot(playerid,LeftSpinner,rxLryLrzL);
    
GetPlayerObjectRot(playerid,LeftSpinner,rxMryMrzM);
    
GetPlayerObjectRot(playerid,LeftSpinner,rxRryRrzR);
    if(
movedup == false)
    {
        
MovePlayerObject(playeridLeftSpinner,2236.60721601.04791000.6791  ZOff,0.01,rxL 120.00.00,-90.0);
        
MovePlayerObject(playeridMiddleSpinner,2236.60721600.92791000.6791  ZOff,0.01,rxM 120.00.00,-90.0);
        
MovePlayerObject(playeridRightSpinner,2236.60721600.80791000.6791  ZOff,0.01,rxR 120.00.00,-90.0);
        
movedup true;
    }
    else
    {
        
MovePlayerObject(playeridLeftSpinner,2236.60721601.04791000.6791  ZOff,0.01,rxL 120.00.00,-90.0);
        
MovePlayerObject(playeridMiddleSpinner,2236.60721600.92791000.6791   ZOff,0.01,rxM 120.00.00,-90.0);
        
MovePlayerObject(playeridRightSpinner,2236.60721600.80791000.6791  ZOff,0.01,rxR 120.00.00,-90.0);
        
movedup false;
    }
    return 
1;
}
public 
SpinSpinners(playerid)
{
    
KillTimer(PreSpinTimer);
    new 
RandSL random(sizeof(Rotations));
    new 
RandSM random(sizeof(Rotations));
    new 
RandSR random(sizeof(Rotations));
    if(
movedup == false)
    {
        
MovePlayerObject(playeridLeftSpinner,2236.60721601.04791000.6791  ZOff,0.1,Rotations[RandSL] + 5.00.00,-90.0);
        
MovePlayerObject(playeridMiddleSpinner,2236.60721600.92791000.6791  ZOff,0.1,Rotations[RandSM] + 5.00.00,-90.0);
        
MovePlayerObject(playeridRightSpinner,2236.60721600.80791000.6791  ZOff,0.1,Rotations[RandSR] + 5.00.00,-90.0);
    }
    else
    {
        
MovePlayerObject(playeridLeftSpinner,2236.60721601.04791000.6791  ZOff,0.1,Rotations[RandSL] + 5.00.00,-90.0);
        
MovePlayerObject(playeridMiddleSpinner,2236.60721600.92791000.6791  ZOff,0.1,Rotations[RandSM] + 5.00.00,-90.0);
        
MovePlayerObject(playeridRightSpinner,2236.60721600.80791000.6791  ZOff,0.1,Rotations[RandSR]+ 5.00.00,-90.0);
    }
    
SymbolSL ResultIDsLeft[RandSL];
    
SymbolSM ResultIDsMiddle[RandSM];
    
SymbolSR ResultIDsRight[RandSR];
    
GiveResult(playerid);
    return 
1;
}
public 
GiveResult(playerid)
{
    
IsSpinning[playerid] = false;
    
TextDrawSetString(PlayerEnum[playerid][Textdraw2],ResultNames[SymbolSL 1]);
    
TextDrawSetString(PlayerEnum[playerid][Textdraw3],ResultNames[SymbolSM 1]);
    
TextDrawSetString(PlayerEnum[playerid][Textdraw4],ResultNames[SymbolSR 1]);
    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw2]); //Left result
    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw3]); //Middle result
    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw4]); //Right result
    
if(SymbolSL == SymbolSM && SymbolSM == SymbolSR && SymbolSL == SymbolSR//If all the symbols are the same
    
{
        
TextDrawShowForPlayer(playeridPlayerEnum[playerid][Textdraw5]);
        if(
SymbolSL == 1//If the first symbol (thus the other two too) is Symbol ID 1 (goldbar)
        
{
            new 
doublebar[16];
            
format(doublebar,sizeof(doublebar),"= ~r~~h~$%i",REWARD_DOUBLEBAR);
            
TextDrawSetString(PlayerEnum[playerid][Textdraw29],doublebar);
            
GivePlayerMoney(playerid,REWARD_DOUBLEBAR);
            
PlayerEnum[playerid][TotalWon] = PlayerEnum[playerid][TotalWon] + REWARD_DOUBLEBAR;
            
PlayerPlaySound(playerid,5461,0,0,0);
        }
        else if(
SymbolSL == 2)
        {
            new 
bar[16];
            
format(bar,sizeof(bar),"= ~r~~h~$%i",REWARD_BAR);
            
TextDrawSetString(PlayerEnum[playerid][Textdraw28],bar);
            
GivePlayerMoney(playerid,REWARD_BAR);
            
PlayerEnum[playerid][TotalWon] = PlayerEnum[playerid][TotalWon] + REWARD_BAR;
            
PlayerPlaySound(playerid,5448,0,0,0);
        }
        else if(
SymbolSL == 3)
        {
            new 
sixtynine[16];
            
format(sixtynine,sizeof(sixtynine),"= ~r~~h~$%i",REWARD_SIXTYNINE);
            
TextDrawSetString(PlayerEnum[playerid][Textdraw24],sixtynine);
            
GivePlayerMoney(playerid,REWARD_SIXTYNINE);
            
PlayerEnum[playerid][TotalWon] = PlayerEnum[playerid][TotalWon] + REWARD_SIXTYNINE;
            
PlayerPlaySound(playerid,5448,0,0,0);
        }
        else if(
SymbolSL == 4)
        {
            new 
bell[16];
            
format(bell,sizeof(bell),"= ~r~~h~$%i",REWARD_BELL);
            
TextDrawSetString(PlayerEnum[playerid][Textdraw27],bell);
            
GivePlayerMoney(playerid,REWARD_BELL);
            
PlayerEnum[playerid][TotalWon] = PlayerEnum[playerid][TotalWon] + REWARD_BELL;
            
PlayerPlaySound(playerid,5448,0,0,0);
        }
        else if(
SymbolSL == 5)
        {
            new 
grapes[16];
            
format(grapes,sizeof(grapes),"= ~r~~h~$%i",REWARD_GRAPES);
            
TextDrawSetString(PlayerEnum[playerid][Textdraw25],grapes);
            
GivePlayerMoney(playerid,REWARD_GRAPES);
            
PlayerEnum[playerid][TotalWon] = PlayerEnum[playerid][TotalWon] + REWARD_GRAPES;
            
PlayerPlaySound(playerid,5448,0,0,0);
        }
        else
        {
            new 
cherry[16];
            
format(cherry,sizeof(cherry),"= ~r~~h~$%i",REWARD_CHERRY);
            
TextDrawSetString(PlayerEnum[playerid][Textdraw26],cherry);
            
GivePlayerMoney(playerid,REWARD_CHERRY);
            
PlayerEnum[playerid][TotalWon] = PlayerEnum[playerid][TotalWon] + REWARD_CHERRY;
            
PlayerPlaySound(playerid,5448,0,0,0);
        }
    }
    
SetPlayerWonPaid(playerid);
}
public 
SetPlayerWonPaid(playerid)
{
    new 
PaidString[32], WonString[32], TotalString[32];
    
PlayerEnum[playerid][TotalTotal] = PlayerEnum[playerid][TotalWon] - PlayerEnum[playerid][TotalPaid];
    
format(PaidString,sizeof(PaidString),"~w~paid:    ~r~$%i",PlayerEnum[playerid][TotalPaid]);
    
format(WonString,sizeof(WonString),"~w~won:   ~g~$%i",PlayerEnum[playerid][TotalWon]);
    if(
PlayerEnum[playerid][TotalTotal] > 0)
    {
        
format(TotalString,sizeof(TotalString),"~w~total:    ~g~+$%i",PlayerEnum[playerid][TotalTotal]);
    }
    else if(
PlayerEnum[playerid][TotalTotal] == 0)
    {
        
format(TotalString,sizeof(TotalString),"~w~total:    ~y~$%i",PlayerEnum[playerid][TotalTotal]);
    }
    else if(
PlayerEnum[playerid][TotalTotal] < 0)
    {
        
format(TotalString,sizeof(TotalString),"~w~total:    ~r~$%i",PlayerEnum[playerid][TotalTotal]);
    }
    
TextDrawSetString(PlayerEnum[playerid][Textdraw32],WonString);
    
TextDrawSetString(PlayerEnum[playerid][Textdraw34],TotalString);
    
TextDrawSetString(PlayerEnum[playerid][Textdraw35],PaidString);
    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw32]);
    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw34]);
    
TextDrawShowForPlayer(playerid,PlayerEnum[playerid][Textdraw35]);
    return 
1;

--------------
Quote:
PHP код:
/*
    Slot Machine script by NaS (2011).
    
    For 0.3dRC5-3 (+)
    
    Change MIN_Bet for the minimum bet
    
    Change MAX_Bet for the maximum bet
    
    Change Bet_STEO for the bet steps (if it's 5 the bets can be: 5, 10, 15, 20 etc up to MAX_Bet)
    Do NOT remove this credits.
*/
#include <a_samp>
// cherry   x   25
// grapes   x  100
// 69       x  250
// bells    x  500
// bar 1    x 1000
// bar 2    x 2000
#define WIN_MULTIPLIER_GLOBAL 1.0
#define MIN_Bet 5
#define MAX_Bet 50
#define Bet_STEP 5
#define G_STATE_NOT_GAMBLING    0
#define G_STATE_READY           1
#define G_STATE_GAMBLING        2
#define G_STATE_DISPLAY         3 // Currently displaying the message
#define G_STATE_PLAY_AGAIN      4 // Not used
#define DISPLAY_TIME 750 // Time to display the messages
#define GAMBLE_TIMER 100 // Decrease this if too fast
new Text:VerText;
new 
Text:ReadyText;
new 
Text:BetText[MAX_PLAYERS];
new 
Text:Box;
new 
Text:Digit1[6];
new 
Text:Digit2[6];
new 
Text:Digit3[6];
new 
Slots[MAX_PLAYERS][3];
new 
SlotCounter[MAX_PLAYERS];
new 
Gambling[MAX_PLAYERS];
new 
SlotTimer[MAX_PLAYERS];
new 
Bet[MAX_PLAYERS];
new 
Balance[MAX_PLAYERS];
new 
bool:rdy=false;
Text:CreateSprite(Float:X,Float:Y,Name[],Float:Width,Float:Height)
{
    new 
Text:RetSprite;
    
RetSprite TextDrawCreate(XYName); // Text is txdfile:texture
    
TextDrawFont(RetSprite4); // Font ID 4 is the sprite draw font
    
TextDrawColor(RetSprite,0xFFFFFFFF);
    
TextDrawTextSize(RetSprite,Width,Height); // Text size is the Width:Height
    
return RetSprite;
}
Text:CreateBox(Float:X,Float:Y,Float:Width,Float:Height,color)
{
    new 
Text[500];
    for(new 
i=floatround(Y); floatround(Y+Height);i++)
    {
        
strcat(Text,"~n~_");
    }
    new 
Text:RetSprite;
    
RetSprite TextDrawCreate(XYText); // Text is txdfile:texture
    
TextDrawFont(RetSprite0); // Font ID 4 is the sprite draw font
    
TextDrawColor(RetSprite,0xFFFFFFFF);
    
TextDrawTextSize(RetSprite,Width+X,Height+Y); // Text size is the Width:Height
    
TextDrawUseBox(RetSprite,1);
    
TextDrawBoxColor(RetSprite,color);
    
TextDrawLetterSize(RetSprite,0.0001,0.1158);
    return 
RetSprite;
}
public 
OnFilterScriptInit()
{
    
SetTimer("RDYBLINK",500,1);
    print(
"Slots init");
    
// CreateSprite(Float:X,Float:Y,Name[],Float:Width,Float:Height)
    
    
new Float:350.0;
    
    
Box CreateBox(194.0,Y-20,3*64.0 3*20,84,0x00000077);
    
    
// Cherries (x25)
    
Digit1[0] = CreateSprite(214.0,Y,"LD_SLOT:cherry",64,64);
    
Digit2[0] = CreateSprite(288.0,Y,"LD_SLOT:cherry",64,64);
    
Digit3[0] = CreateSprite(362.0,Y,"LD_SLOT:cherry",64,64);
    
    
// grapes (x100)
    
Digit1[1] = CreateSprite(214.0,Y,"LD_SLOT:grapes",64,64);
    
Digit2[1] = CreateSprite(288.0,Y,"LD_SLOT:grapes",64,64);
    
Digit3[1] = CreateSprite(362.0,Y,"LD_SLOT:grapes",64,64);
    
    
// 69's (x250)
    
Digit1[2] = CreateSprite(214.0,Y,"LD_SLOT:r_69",64,64);
    
Digit2[2] = CreateSprite(288.0,Y,"LD_SLOT:r_69",64,64);
    
Digit3[2] = CreateSprite(362.0,Y,"LD_SLOT:r_69",64,64);
    
    
// bells (x500)
    
Digit1[3] = CreateSprite(214.0,Y,"LD_SLOT:bell",64,64);
    
Digit2[3] = CreateSprite(288.0,Y,"LD_SLOT:bell",64,64);
    
Digit3[3] = CreateSprite(362.0,Y,"LD_SLOT:bell",64,64);
    
    
// Bars [1 bar] (x1000)
    
Digit1[4] = CreateSprite(214.0,Y,"LD_SLOT:bar1_o",64,64);
    
Digit2[4] = CreateSprite(288.0,Y,"LD_SLOT:bar1_o",64,64);
    
Digit3[4] = CreateSprite(362.0,Y,"LD_SLOT:bar1_o",64,64);
    
    
// Bars [2 bar] (x2000)
    
Digit1[5] = CreateSprite(214.0,Y,"LD_SLOT:bar2_o",64,64);
    
Digit2[5] = CreateSprite(288.0,Y,"LD_SLOT:bar2_o",64,64);
    
Digit3[5] = CreateSprite(362.0,Y,"LD_SLOT:bar2_o",64,64);
    
    
    
ReadyText=TextDrawCreate(320.0,Y+1.4,"~w~Ready to play.~n~~b~ ~k~~PED_SPRINT~ ~w~- ~g~gamble~n~~b~~k~~VEHICLE_ENTER_EXIT~ ~w~- ~r~exit~n~~b~~k~~PED_JUMPING~ ~w~- ~y~increase Bet");
    
TextDrawUseBox(ReadyText,1);
    
TextDrawFont(ReadyText,2);
    
TextDrawSetShadow(ReadyText,0);
    
TextDrawSetOutline(ReadyText,1);
    
TextDrawLetterSize(ReadyText,0.3,1.23);
    
TextDrawAlignment(ReadyText,2);
    
TextDrawBoxColor(ReadyText,0x00000077);
    
TextDrawTextSize(ReadyText,350,210);
    
    
VerText=TextDrawCreate(194.0,Y-21,"~g~$$$ ~p~$lotmachine v0.5 - by NaS ~g~$$$");
    
TextDrawFont(VerText,1);
    
TextDrawSetShadow(VerText,0);
    
TextDrawSetOutline(VerText,1);
    
TextDrawLetterSize(VerText,0.16,0.65);
    
    for(new 
iMAX_PLAYERSi++)
    {
        
BetText[i]=TextDrawCreate(195.0,Y+58,"~y~Bet: 5$");
        
TextDrawFont(BetText[i],2);
        
TextDrawLetterSize(BetText[i],0.35,0.8);
        
TextDrawSetShadow(BetText[i],0);
        
TextDrawSetOutline(BetText[i],1);
    }
    for(new 
iMAX_PLAYERSi++) if(IsPlayerConnected(i)) OnPlayerConnect(i); // This will make the slotmachine usable for already connected players!
    
return 1;
}
public 
OnFilterScriptExit()
{
    
TextDrawDestroy(Digit1[0]);
    
TextDrawDestroy(Digit2[0]);
    
TextDrawDestroy(Digit3[0]);
    
    
TextDrawDestroy(Digit1[1]);
    
TextDrawDestroy(Digit2[1]);
    
TextDrawDestroy(Digit3[1]);
    
    
TextDrawDestroy(Digit1[2]);
    
TextDrawDestroy(Digit2[2]);
    
TextDrawDestroy(Digit3[2]);
    
    
TextDrawDestroy(Digit1[3]);
    
TextDrawDestroy(Digit2[3]);
    
TextDrawDestroy(Digit3[3]);
    
    
TextDrawDestroy(Digit1[4]);
    
TextDrawDestroy(Digit2[4]);
    
TextDrawDestroy(Digit3[4]);
    
    
TextDrawDestroy(Digit1[5]);
    
TextDrawDestroy(Digit2[5]);
    
TextDrawDestroy(Digit3[5]);
    
    
    
TextDrawDestroy(Box);
    
TextDrawDestroy(ReadyText);
    
TextDrawDestroy(VerText);
    
    for(new 
iMAX_PLAYERSi++)
    {
        
TextDrawDestroy(BetText[i]);
    }
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
Gambling[playerid] = G_STATE_NOT_GAMBLING;
    
SlotTimer[playerid] = -1;
    
//GivePlayerMoney(playerid,100000);
    
    
    //SendClientMessage(playerid,-1,"Welcome!");
    //printf("Connect: %d",playerid);
    
return 1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
ExitPlayerFromSlotMachine(playerid);
    
    
TextDrawHideForPlayer(playerid,Digit1[0]);
    
TextDrawHideForPlayer(playerid,Digit2[0]);
    
TextDrawHideForPlayer(playerid,Digit3[0]);
    
TextDrawHideForPlayer(playerid,Digit1[1]);
    
TextDrawHideForPlayer(playerid,Digit2[1]);
    
TextDrawHideForPlayer(playerid,Digit3[1]);
    
TextDrawHideForPlayer(playerid,Digit1[2]);
    
TextDrawHideForPlayer(playerid,Digit2[2]);
    
TextDrawHideForPlayer(playerid,Digit3[2]);
    
TextDrawHideForPlayer(playerid,Digit1[3]);
    
TextDrawHideForPlayer(playerid,Digit2[3]);
    
TextDrawHideForPlayer(playerid,Digit3[3]);
    
TextDrawHideForPlayer(playerid,Digit1[4]);
    
TextDrawHideForPlayer(playerid,Digit2[4]);
    
TextDrawHideForPlayer(playerid,Digit3[4]);
    
TextDrawHideForPlayer(playerid,Digit1[5]);
    
TextDrawHideForPlayer(playerid,Digit2[5]);
    
TextDrawHideForPlayer(playerid,Digit3[5]);
    
    
TextDrawHideForPlayer(playerid,Box);
    
TextDrawHideForPlayer(playerid,ReadyText);
    
    if(
SlotTimer[playerid] != -1KillTimer(SlotTimer[playerid]);
    return 
1;
}
ShowPlayerSlots(playerid,slot1,slot2,slot3)
{
    
TextDrawHideForPlayer(playerid,Digit1[0]);
    
TextDrawHideForPlayer(playerid,Digit2[0]);
    
TextDrawHideForPlayer(playerid,Digit3[0]);
    
    
TextDrawHideForPlayer(playerid,Digit1[1]);
    
TextDrawHideForPlayer(playerid,Digit2[1]);
    
TextDrawHideForPlayer(playerid,Digit3[1]);
    
    
TextDrawHideForPlayer(playerid,Digit1[2]);
    
TextDrawHideForPlayer(playerid,Digit2[2]);
    
TextDrawHideForPlayer(playerid,Digit3[2]);
    
    
TextDrawHideForPlayer(playerid,Digit1[3]);
    
TextDrawHideForPlayer(playerid,Digit2[3]);
    
TextDrawHideForPlayer(playerid,Digit3[3]);
    
    
TextDrawHideForPlayer(playerid,Digit1[4]);
    
TextDrawHideForPlayer(playerid,Digit2[4]);
    
TextDrawHideForPlayer(playerid,Digit3[4]);
    
    
TextDrawHideForPlayer(playerid,Digit1[5]);
    
TextDrawHideForPlayer(playerid,Digit2[5]);
    
TextDrawHideForPlayer(playerid,Digit3[5]);
    
    
    
TextDrawShowForPlayer(playerid,Digit1[slot1]);
    
TextDrawShowForPlayer(playerid,Digit2[slot2]);
    
TextDrawShowForPlayer(playerid,Digit3[slot3]);
    
    
TextDrawShowForPlayer(playerid,Box);
}
HideSlotsForPlayer(playerid)
{
    
TextDrawHideForPlayer(playerid,Digit1[0]);
    
TextDrawHideForPlayer(playerid,Digit2[0]);
    
TextDrawHideForPlayer(playerid,Digit3[0]);
    
TextDrawHideForPlayer(playerid,Digit1[1]);
    
TextDrawHideForPlayer(playerid,Digit2[1]);
    
TextDrawHideForPlayer(playerid,Digit3[1]);
    
TextDrawHideForPlayer(playerid,Digit1[2]);
    
TextDrawHideForPlayer(playerid,Digit2[2]);
    
TextDrawHideForPlayer(playerid,Digit3[2]);
    
TextDrawHideForPlayer(playerid,Digit1[3]);
    
TextDrawHideForPlayer(playerid,Digit2[3]);
    
TextDrawHideForPlayer(playerid,Digit3[3]);
    
TextDrawHideForPlayer(playerid,Digit1[4]);
    
TextDrawHideForPlayer(playerid,Digit2[4]);
    
TextDrawHideForPlayer(playerid,Digit3[4]);
    
TextDrawHideForPlayer(playerid,Digit1[5]);
    
TextDrawHideForPlayer(playerid,Digit2[5]);
    
TextDrawHideForPlayer(playerid,Digit3[5]);
    
    
TextDrawHideForPlayer(playerid,Box);
}
PutPlayerInSlotMachine(playeridfirstBet=MIN_Bet,  startBalance=0)
{
    if(
Gambling[playerid] != G_STATE_NOT_GAMBLING) return print("Already gambling");
    
    
Gambling[playerid] = G_STATE_READY;
    
TextDrawShowForPlayer(playerid,ReadyText);
    
TextDrawShowForPlayer(playerid,BetText[playerid]);
    
TextDrawShowForPlayer(playerid,VerText);
    
    
Slots[playerid][0] = random(5);
    
Slots[playerid][1] = random(5);
    
Slots[playerid][2] = random(5);
    
ShowPlayerSlots(playerid,Slots[playerid][0],Slots[playerid][1],Slots[playerid][2]);
    
    
Bet[playerid] = firstBet;
    
    
GivePlayerMoney(playerid,-startBalance);
    
    
Balance[playerid] = startBalance;
    
    
UpdateBetText(playerid);
    
    
TogglePlayerControllable(playerid,0);
    return 
1;
}
ExitPlayerFromSlotMachine(playerid)
{
    if(
Gambling[playerid] == G_STATE_NOT_GAMBLING) return 0;
    
HideSlotsForPlayer(playerid);
    
Gambling[playerid] = G_STATE_NOT_GAMBLING;
    
    
TogglePlayerControllable(playerid,1);
    
    
TextDrawHideForPlayer(playerid,ReadyText);
    
TextDrawHideForPlayer(playerid,BetText[playerid]);
    
TextDrawHideForPlayer(playerid,VerText);
    
    new 
str[128];
    if(
Balance[playerid] > 0format(str,sizeof(str),"~g~Your balance: %d$",Balance[playerid]);
    else 
format(str,sizeof(str),"~r~You lost your money. Stop playing.",Balance[playerid]);
    
GameTextForPlayer(playerid,str,5000,4);
    
    
GivePlayerMoney(playerid,Balance[playerid]);
    return 
1;
}
/*PlayAgain(playerid)
{
    Gambling[playerid] = G_STATE_READY;
    Slots[playerid][0] = random(5);
    Slots[playerid][1] = random(5);
    Slots[playerid][2] = random(5);
    ShowPlayerSlots(playerid,Slots[playerid][0],Slots[playerid][1],Slots[playerid][2]);
}*/
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
newkeys KEY_SPRINT)
    {
        
// Randomize if in Slotmachine
        
if(Gambling[playerid] == G_STATE_READY)
        {
            new 
money GetPlayerMoney(playerid);
            if(
Bet[playerid] > money+Balance[playerid])
            {
                
GameTextForPlayer(playerid,"~r~You don't have enough money!",5000,4);
                return 
1;
            }
            
            if(
Balance[playerid] - Bet[playerid] < 0)
            {
                
GameTextForPlayer(playerid,"~r~Your balance is too low!",5000,4);
                return 
1;
            }
            
            
SlotCounter[playerid] = 30+random(18);
            
SlotTimer[playerid] = SetTimerEx("Gambler",GAMBLE_TIMER,1,"d",playerid);
            
Gambling[playerid] = G_STATE_GAMBLING;
            
             
Balance[playerid]-=Bet[playerid];
             
             new 
prefix[4];
            if(
Balance[playerid] == 0strcat(prefix,"~y~");
            if(
Balance[playerid]  > 0strcat(prefix,"~g~");
            if(
Balance[playerid]  < 0strcat(prefix,"~r~");
            
UpdateBetText(playerid);
             
             
TextDrawHideForPlayer(playerid,ReadyText);
        }
    }
    
    if(
newkeys KEY_SECONDARY_ATTACK)
    {
        if(
Gambling[playerid] == G_STATE_READY)
        {
            
ExitPlayerFromSlotMachine(playerid);
        }
    }
    
    if(
newkeys KEY_JUMP)
    {
        if(
Gambling[playerid] == G_STATE_READY)
        {
            
Bet[playerid] = GetNextValidBet(Bet[playerid]);
            
UpdateBetText(playerid);
        }
    }
    return 
1;
}
forward Gambler(playerid);
public 
Gambler(playerid)
{
    if(
Gambling[playerid] != G_STATE_GAMBLING)
    {
        print(
"Strange error @ gambler");
        
KillTimer(SlotTimer[playerid]);
        
SlotTimer[playerid] = -1;
        
Gambling[playerid] = G_STATE_NOT_GAMBLING;
        return 
0;
    }
    
SlotCounter[playerid] -= 1;
    
    new 
slot SlotCounter[playerid];
    
    if(
slot 10)
    {
        
Slots[playerid][2]+=random(3)+1;
    }
    else if(
slot 20)
    {
        
Slots[playerid][1]+=random(3)+1;
        
Slots[playerid][2]+=random(3)+1;
    }
    else
    {
        
Slots[playerid][0]+=random(3)+1;
        
Slots[playerid][1]+=random(3)+1;
        
Slots[playerid][2]+=random(3)+1;
    }
    if(
Slots[playerid][0] >= 6Slots[playerid][0] = 0;
    if(
Slots[playerid][1] >= 6Slots[playerid][1] = 0;
    if(
Slots[playerid][2] >= 6Slots[playerid][2] = 0;
    
    
ShowPlayerSlots(playerid,Slots[playerid][0],Slots[playerid][1],Slots[playerid][2]);
    
    if(
SlotCounter[playerid] == 0)
    {
        
KillTimer(SlotTimer[playerid]);
        
SlotTimer[playerid] = -1;
        
Gambling[playerid] = G_STATE_DISPLAY;
        
        if(
Slots[playerid][0] == Slots[playerid][1] && Slots[playerid][0] == Slots[playerid][2])
        {
            
//printf("player %d won with %d",playerid,Slots[playerid][0]); // Uncomment this line for seeing all wins
            
            
new Multiplier=1;
            
            switch(
Slots[playerid][0])
            {
                case 
0Multiplier 25;    // Cherries
                
case 1Multiplier 100;   // Grapes
                
case 2Multiplier 250;   // 69's
                
case 3Multiplier 500;   // Bells
                
case 4Multiplier 1000;  // Bar
                
case 5Multiplier 2000;  // Double Bars
            
}
            
            new 
money floatround(Bet[playerid] * Multiplier WIN_MULTIPLIER_GLOBAL);
            new 
str[128];
            
format(str,sizeof(str),"~w~Winner: ~g~%d$~w~!",money);
            
GameTextForPlayer(playerid,str,5000,4);
            
            
Balance[playerid] += money;
            
            
UpdateBetText(playerid);
            
            
Slots[playerid][0] = random(5); // Randomize the slots again
            
Slots[playerid][1] = random(5);
            
Slots[playerid][2] = random(5);
        }
        else
        {
            if(
Slots[playerid][0] == Slots[playerid][1] || Slots[playerid][1] == Slots[playerid][2] || Slots[playerid][0] == Slots[playerid][2]) GameTextForPlayer(playerid,"Almost!",3000,4);
            else 
GameTextForPlayer(playerid,"Bad luck!",3000,4);
        }
        
        
SetTimerEx("PlayAgainTimer",DISPLAY_TIME,0,"d",playerid);
        return 
1;
    }
    
//printf("Counter: %d",SlotCounter[playerid]);
    
return 0;
}
forward PlayAgainTimer(playerid);
public 
PlayAgainTimer(playerid)
{
    
Gambling[playerid] = G_STATE_READY;
    
TextDrawShowForPlayer(playerid,ReadyText);
    
    
// Remove the following 3 lines to disable the ability to hold down SPRINT
    
new keys,lr,ud;
    
GetPlayerKeys(playerid,keys,ud,lr);
    if(
keys KEY_SPRINTOnPlayerKeyStateChange(playerid,KEY_SPRINT,0);
}
GetNextValidBet(value)
{
    if(
value Bet_STEP MAX_Bet) return MIN_Bet;
    return 
value Bet_STEP;
}
UpdateBetText(playerid)
{
    new 
str[128];
    new 
prefix[4];
    if(
Balance[playerid] == 0strcat(prefix,"~r~");
    if(
Balance[playerid]  > 0strcat(prefix,"~g~");
    
    
format(str,sizeof(str),"~w~Bet: ~g~%d$_____~w~Balance: %s%d$",Bet[playerid],prefix,Balance[playerid]);
    
TextDrawSetString(BetText[playerid],str);
}
forward RDYBLINK();
public 
RDYBLINK()
{
    
// This will make the "Place your bet" text blinking. Comment out the Timer at OnFilterScriptInit for disabling it.
    
rdy=!rdy;
    if(
rdy)
    {
        
TextDrawSetString(ReadyText,"~w~Place your ~y~bet~w~!~n~~b~ ~k~~PED_SPRINT~ ~w~- ~g~gamble~n~~b~~k~~VEHICLE_ENTER_EXIT~ ~w~- ~r~exit~n~~b~~k~~PED_JUMPING~ ~w~- ~y~increase Bet");
    }
    else
    {
        
TextDrawSetString(ReadyText,"_~n~~b~ ~k~~PED_SPRINT~ ~w~- ~g~gamble~n~~b~~k~~VEHICLE_ENTER_EXIT~ ~w~- ~r~exit~n~~b~~k~~PED_JUMPING~ ~w~- ~y~increase Bet");
    }
}
stock strtok(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
    new 
offset index;
    new 
result[128]; // modified to 128
    
while ((index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
cmd[128],idx;
    
    
cmd strtok(cmdtext,idx);
    
    if (
strcmp(cmd"/gamble"true) == 0)
    {
        
cmd strtok(cmdtext,idx);
        
        if(!
strlen(cmd)) return SendClientMessage(playerid,-1,"Use /gamble [money] to put money into the Slot Machine!");
        
        new 
money strval(cmd);
        
        if(
money MIN_Bet) return SendClientMessage(playerid,-1,"You have to put more money into the Slot Machine!");
        
        if(
money GetPlayerMoney(playerid)) return SendClientMessage(playerid,-1,"You don't have enough money!");
        
        if(
money 0) return SendClientMessage(playerid,-1,"Invalid amount!");
        
        
PutPlayerInSlotMachine(playerid,_,money);
        return 
1;
    }
    return 
0;

Reply
#3

Why command /tune it works as on clip, put car in garage and show menu.
I have this on gamemod but I do not know where it is?
Reply
#4

Check If you have any functions that are blocking the Pay 'n' Spray, something like this:

PHP код:
DisableTuningGarages();
DisablePayNSpray();
SetPayNSprayPrice(price);
SetComponentPrice(componentid);
public 
OnVehiclePayNSpray(vehicleid,color1,color2);
public 
OnVehicleTuned(vehicleid);
public 
OnVehicleEnterTuneShop(vehicleid); //for anti-teleport anticheat
public OnVehicleExitTuneShop(vehicleid); //for anti-teleport anticheat 
Well, I can't really help you out with this one since I'm not really sure how you do that. What you could do is use IsPlayerInRangeOfPoint (https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint), get the coordinates of the garages you want to use and then allow them to type /tune near the garages.

Hopefully someone else can just tell you how to allow people to enter the garages.
Reply
#5

I don't know how this mod garage and casino work on server but them haven't in script and gamemod?
Reply
#6

These are filterscripts. Open pawno, copy and paste the code of the slot machine system you choose and compile it. Then add it has a Filterscript in server.cfg. Do the same for the garage system (open Pawno > make a new file > copy and paste the code > compile > add the FS in the filterscripts line @ server.cfg).
Reply
#7

I was looking for this:
gl_property.amx(command /enter and PutPlayerInProperty)
scriptfiles/properties - cords of business and business's interior
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)