Guest User

RatMachines v1.0

a guest
Jan 29th, 2012
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 36.02 KB | None | 0 0
  1. ////////////////////////////////////////////
  2. /////////////////RatMachines////////////////
  3. ////////////Made by: [FSaF]Jarno////////////
  4. ////////////////Version: 1.0////////////////
  5. //////You are free to edit this script//////
  6. //////for your own use, if you won't  //////
  7. //////claim it as your own.           //////
  8. //////Do not reupload this script to  //////
  9. //////any website without asking the  //////
  10. //////author. Report any bugs to the  //////
  11. //////forum post.                     //////
  12. //////Note: This script is not 100    //////
  13. //////percent made by [FSaF]Jarno.    //////
  14. //////Some functions are found from   //////
  15. //////the internet. (Such as GetXYIn  //////
  16. //////FrontOfPlayer)                  //////
  17. ////////////////////////////////////////////
  18. /////////////////Have fun!//////////////////
  19. ////////////////////////////////////////////
  20. ///////////////MACHINE IDS//////////////////
  21. ////////0 - Sprunk machine          ////////
  22. ////////1 - Weapon machine          ////////
  23. ////////2 - Poker machine           ////////
  24. ////////3 - ATM                     ////////
  25. ////////////////////////////////////////////
  26.  
  27. #include <a_samp>
  28. #include <dutils>
  29. #include <dini>
  30.  
  31. // These are the defines to permissions of creating/deleting machines.
  32. #define ADMINCHECK "GetAdminLevel" // Replace this with your own adminlevel check callback. If you don't have one, leave it like that and define "RCON_ONLY" to true.
  33. #define ADMINLEVEL 3 // Adminlevel needed to use the script. If you are only using RCON, leave this like that.
  34. #define ADMINFORMAT "%d" // Adminlevel check format. If you use RCON instead of your own scripts, don't change this.
  35. #define ADMININPUT playerid // Adminlevel input. If oyu use RCON instead of your own scripts, don't change this.
  36. #define RCON_ONLY false // If you want to use RCON instead of your own adminscript define this to true.
  37. #define VERSION 1.0
  38. #define SPRUNKINDEX 6 // Change this to an open object attaching slot if you need
  39. #define HEALTHADDITION 10 // Change this to the amount of HP the sprunk machine should restore.
  40. #define SPRUNKCOST 5 // Change this to the amount of money the sprunk machine will take per use.
  41. #define WEAPON 29 // Change this to the weapon you want to be given from the gun machines.
  42. #define AMMO 300 // Change this to the amount of bullets you want the gun machine to give you.
  43. #define WEAPONCOST 300 // Change this to the amount of money the gun machine will take per use.
  44. #define POKERCOST 80 // Change this to the amount of money the poker machine will take per use. (Note: The maximum win will be POKERCOST*256)
  45. #pragma unused ret_memcpy
  46.  
  47.  
  48. new VendingType[MAX_OBJECTS] = -1;
  49. new PlayerLastMachine[MAX_PLAYERS];
  50. new UsingPoker[MAX_PLAYERS];
  51. new Text:ATM[MAX_PLAYERS];
  52. new PlayerATMLine[MAX_PLAYERS];
  53. new UsingATM[MAX_PLAYERS];
  54. new MenuID[MAX_PLAYERS];
  55. new BankMoney[MAX_PLAYERS];
  56.  
  57. forward Animation(playerid,id);
  58. forward SpecialAction(playerid,action);
  59.  
  60. stock LoadMachines() {
  61.         for(new i; i<MAX_OBJECTS; i++)
  62.         {
  63.             if (VendingType[i] != -1) DestroyObject(i);
  64.         }
  65.         new File:hFile;
  66.         new tmpres[MAX_STRING],i=0;
  67.  
  68.         new machinetype;
  69.         new Float:x;
  70.         new Float:y;
  71.         new Float:z;
  72.         new Float:a;
  73.    
  74.         new file[256];
  75.         format(file,256,"/RatMachines/machines.txt");
  76.         hFile = fopen(file, io_read);
  77.         if (hFile)
  78.         {
  79.         tmpres[0]=0;
  80.         while (fread(hFile, tmpres)) {
  81.             StripNewLine(tmpres);
  82.             if (tmpres[0]!=0) {
  83.                 machinetype = strval(strtok(tmpres,i,','));
  84.                 //spawn X
  85.                 x = Float:floatstr(strtok(tmpres,i,','));
  86.                 //spawn Y
  87.                 y = Float:floatstr(strtok(tmpres,i,','));
  88.                 //spawn Z
  89.                 z = Float:floatstr(strtok(tmpres,i,','));
  90.                 //rotation x
  91.                 a = Float:floatstr(strtok(tmpres,i,','));
  92.                 if (machinetype == 0)VendingType[CreateObject(955,x,y,z,0,0,a)] = 0;
  93.                 if (machinetype == 1)VendingType[CreateObject(18885,x,y,z,0,0,a)] = 1;
  94.                 if (machinetype == 2)VendingType[CreateObject(1515,x,y,z,0,0,a)] = 2;
  95.                 if (machinetype == 3)VendingType[CreateObject(2942,x,y,z,0,0,a)] = 3;
  96.             }
  97.             tmpres[0]=0;
  98.             i=0;
  99.         }
  100.         }
  101.         fclose(hFile);
  102.         return 1;
  103. }
  104.  
  105. public SpecialAction(playerid,action)
  106. {
  107.     SetPlayerSpecialAction(playerid,action);
  108.     return 1;
  109. }
  110.  
  111. public Animation(playerid,id)
  112. {
  113.     if (id == 1)ApplyAnimation(playerid,"VENDING","VEND_Drink_P",1.4,0,1,1,0,1200,1);
  114.     if (id == 0)
  115.     {
  116.         ApplyAnimation(playerid,"VENDING","VEND_Use_pt2",1.4,0,1,1,0,400,1);
  117.         SetPlayerAttachedObject(playerid,SPRUNKINDEX,1546,5,0.1,0.05,0,0,180,0);
  118.     }
  119.     if (id == 2) RemovePlayerAttachedObject(playerid,SPRUNKINDEX);
  120.     if (id == 3)
  121.     {
  122.         new Float:h;
  123.         GetPlayerHealth(playerid,h);
  124.         if (h+HEALTHADDITION <= 100) h = h+HEALTHADDITION;
  125.         SetPlayerHealth(playerid,h);
  126.     }
  127.     if (id == 4)
  128.     {
  129.         GivePlayerWeapon(playerid,WEAPON,AMMO);
  130.     }
  131.     if (id == 5)
  132.     {
  133.         new msg[128];
  134.         new win = random(60);
  135.         new won;
  136.         if ((win >= 0) && (win < 5)) format(msg,128,"You won %d$!",won =POKERCOST*2);
  137.         else if ((win >= 5) && (win < 10)) format(msg,128,"You won %d$!",won =POKERCOST*4);
  138.         else if ((win >= 10) && (win < 15)) format(msg,128,"You won %d$!",won =POKERCOST*8);
  139.         else if ((win >= 15) && (win < 18)) format(msg,128,"You won %d$!",won =POKERCOST*16);
  140.         else if ((win >= 18) && (win < 20)) format(msg,128,"You won %d$!",won =POKERCOST*32);
  141.         else if (win == 20) format(msg,128,"You won %d$!",won =POKERCOST*256);
  142.         else format(msg,128,"No win!");
  143.         GivePlayerMoney(playerid,won);
  144.         SendClientMessage(playerid,0xAAFFAAFF,msg);
  145.         UsingPoker[playerid] = 0;
  146.     }
  147.     if (id == 6)
  148.     {
  149.         TextDrawSetString(ATM[playerid],"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
  150.         TextDrawShowForPlayer(playerid,ATM[playerid]);
  151.         SetTimerEx("Animation",1000,0,"dd",playerid,7);
  152.     }
  153.     if (id == 7)
  154.     {
  155.         new msg[512];
  156.         format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->Take money out~n~   Deposit money ~n~   Exit             ~n~~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  157.         TextDrawSetString(ATM[playerid],msg);
  158.         PlayerATMLine[playerid] = 1;
  159.         MenuID[playerid] = 1;
  160.     }
  161.     return 1;
  162. }
  163.  
  164.  
  165. stock GetName(playerid)
  166. {
  167.     new PlayerName[32];
  168.     GetPlayerName(playerid,PlayerName,32);
  169.     return PlayerName;
  170. }
  171.  
  172.  
  173. public OnFilterScriptInit()
  174. {
  175.     for(new i; i<MAX_OBJECTS; i++)
  176.     {
  177.         VendingType[i] = -1;
  178.     }
  179.     for(new i; i<MAX_PLAYERS; i++)
  180.     {
  181.         PlayerLastMachine[i] = -1;
  182.         ATM[i] = TextDrawCreate(320,1,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
  183.         TextDrawUseBox(ATM[i],1);
  184.         TextDrawBoxColor(ATM[i],0x0000FFFF);
  185.         TextDrawAlignment(ATM[i],2);
  186.         TextDrawSetProportional(ATM[i],1);
  187.         if (IsPlayerConnected(i))OnPlayerConnect(i);
  188.     }
  189.     print("\n\n--------------------------------------");
  190.     printf(" RatMachines v%2.1f by [FSaF]Jarno loaded!",VERSION);
  191.     print("--------------------------------------\n\n");
  192.     LoadMachines();
  193.     return 1;
  194. }
  195.  
  196. public OnPlayerConnect(playerid)
  197. {
  198.     new file[128];
  199.     format(file,128,"/RatMachines/ATMDATA/%s.ini",GetName(playerid));
  200.     if (!dini_Exists(file))dini_Create(file);
  201.     BankMoney[playerid] = dini_Int(file,"ATM");
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerDisconnect(playerid)
  206. {
  207.     new file[128];
  208.     format(file,128,"/RatMachines/ATMDATA/%s.ini",GetName(playerid));
  209.     if (!dini_Exists(file))dini_Create(file);
  210.     dini_IntSet(file,"ATM",BankMoney[playerid]);
  211.     return 1;
  212. }
  213.  
  214. public OnGameModeInit()
  215. {
  216.     LoadMachines();
  217.     return 1;
  218. }
  219.  
  220. public OnFilterScriptExit()
  221. {
  222.     print("\n\n--------------------------------------");
  223.     printf(" RatMachines v%2.1f by [FSaF]Jarno unloaded!",VERSION);
  224.     print("--------------------------------------\n\n");
  225.     new File:F_SAVE = fopen("/RatMachines/machines.txt", io_write);
  226.     if(F_SAVE)
  227.     {
  228.         for(new i; i<MAX_OBJECTS; i++)
  229.         {
  230.             if (VendingType[i] != -1)
  231.             {
  232.                 new Float:x, Float:y, Float:z, Float:a;
  233.                 GetObjectRot(i,x,y,a);
  234.                 GetObjectPos(i,x,y,z);
  235.                 new line[128];
  236.                 format(line,128,"%d,%f,%f,%f,%f\r\n",VendingType[i],x,y,z,a);
  237.                 fwrite(F_SAVE,line);
  238.                 DestroyObject(i);
  239.             }
  240.         }
  241.     }
  242.     fclose(F_SAVE);
  243.     for(new i; i<MAX_PLAYERS; i++)
  244.     {
  245.         TextDrawDestroy(ATM[i]);
  246.         if (IsPlayerConnected(i))OnPlayerDisconnect(i,1);
  247.     }
  248.     return 1;
  249. }
  250.  
  251. stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  252. {
  253.     new Float:a;
  254.     GetPlayerPos(playerid, x, y, a);
  255.     GetPlayerFacingAngle(playerid, a);
  256.     if (GetPlayerVehicleID(playerid))
  257.     {
  258.         GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  259.     }
  260.     x += (distance * floatsin(-a, degrees));
  261.     y += (distance * floatcos(-a, degrees));
  262. }
  263.  
  264. stock GetXYInFrontOfObject(playerid, &Float:x, &Float:y, Float:distance)
  265. {
  266.     new Float:a, Float:z;
  267.     GetObjectRot(playerid,x,y,a);
  268.     GetObjectPos(playerid, x, y, z);
  269.     x += (distance * floatsin(-a, degrees));
  270.     y += (distance * floatcos(-a, degrees));
  271. }
  272.  
  273. public OnPlayerCommandText(playerid,cmdtext[])
  274. {
  275.     new cmd[256];
  276.     new idx;
  277.     cmd = strtok(cmdtext,idx);
  278.     #if RCON_ONLY == true
  279.     if (IsPlayerAdmin(playerid))
  280.     {
  281.     #else
  282.     if (CallRemoteFunction(ADMINCHECK,ADMINFORMAT,ADMININPUT) >= ADMINLEVEL)
  283.     {
  284.     #endif
  285.         if (!strcmp("/createmachine",cmd,true))
  286.         {
  287.             new Float:x, Float:y, Float:z, Float:a, tmp[256], mach;
  288.             GetPlayerPos(playerid,x,y,z);
  289.             GetPlayerFacingAngle(playerid,a);
  290.             tmp = strtok(cmdtext,idx);
  291.             if (strval(tmp) == 0)VendingType[mach = CreateObject(955,x,y,z-0.58,0,0,a)] = 0;
  292.             if (strval(tmp) == 1)VendingType[mach = CreateObject(18885,x,y,z,0,0,a)] = 1;
  293.             if (strval(tmp) == 2)VendingType[mach = CreateObject(1515,x,y,z-1,0,0,a)] = 2;
  294.             if (strval(tmp) == 3)VendingType[mach = CreateObject(2942,x,y,z-0.4,0,0,a)] = 3;
  295.             PlayerLastMachine[playerid] = mach;
  296.             GetXYInFrontOfPlayer(playerid,x,y,-0.75);
  297.             SetPlayerPos(playerid,x,y,z);
  298.             return 1;
  299.         }
  300.        
  301.         if (!strcmp("/undolastmachine",cmd,true))
  302.         {
  303.             DestroyObject(PlayerLastMachine[playerid]);
  304.             PlayerLastMachine[playerid] = -1;
  305.             return 1;
  306.         }
  307.        
  308.         if (!strcmp("/testanim",cmd,true))
  309.         {
  310.             new tmp[256],tmp2[256], tmp3[256];
  311.             tmp = strtok(cmdtext,idx);
  312.             tmp2 = strtok(cmdtext,idx);
  313.             tmp3 = strtok(cmdtext,idx);
  314.             ApplyAnimation(playerid,tmp,tmp2,1.4,0,1,1,0,strval(tmp3));
  315.             return 1;
  316.         }
  317.        
  318.         if (!strcmp("/anim",cmd,true))
  319.         {
  320.             ApplyAnimation(playerid,"VENDING","VEND_Use",1.4,0,1,1,0,2500);
  321.             SetTimerEx("Animation",2500,0,"dd",playerid,0);
  322.             SetTimerEx("Animation",3500,0,"dd",playerid,1);
  323.             return 1;
  324.         }
  325.     }
  326.     return 0;
  327. }
  328.  
  329. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
  330. {
  331.     if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
  332.     {
  333.         for(new i; i<MAX_OBJECTS; i++)
  334.         {
  335.             if (VendingType[i] == 0)
  336.             {
  337.                 new Float:x, Float:y, Float:z;
  338.                 GetObjectPos(i,x,y,z);
  339.                 if (IsPlayerInRangeOfPoint(playerid,1.0,x,y,z+1))
  340.                 {
  341.                     GetXYInFrontOfObject(i,x,y,-1.1);
  342.                     z = z+0.5;
  343.                     SetPlayerPos(playerid,x,y,z);
  344.                     GetObjectRot(i,x,y,z);
  345.                     SetPlayerFacingAngle(playerid,z);
  346.                     ApplyAnimation(playerid,"VENDING","VEND_Use",1.4,0,1,1,0,2500,1);
  347.                     SetTimerEx("Animation",2500,0,"dd",playerid,0);
  348.                     SetTimerEx("Animation",2700,0,"dd",playerid,3);
  349.                     SetTimerEx("Animation",2900,0,"dd",playerid,1);
  350.                     SetTimerEx("Animation",4100,0,"dd",playerid,2);
  351.                     GivePlayerMoney(playerid,-SPRUNKCOST);
  352.                     CallRemoteFunction("OnRatMachineUse","dd",playerid,0);
  353.                 }
  354.             }
  355.             if (VendingType[i] == 1)
  356.             {
  357.                 new Float:x, Float:y, Float:z;
  358.                 GetObjectPos(i,x,y,z);
  359.                 if (IsPlayerInRangeOfPoint(playerid,1.0,x,y,z))
  360.                 {
  361.                     GetXYInFrontOfObject(i,x,y,-1.1);
  362.                     SetPlayerPos(playerid,x,y,z);
  363.                     GetObjectRot(i,x,y,z);
  364.                     SetPlayerFacingAngle(playerid,z);
  365.                     ApplyAnimation(playerid,"VENDING","VEND_Use",1.4,0,1,1,0,2500,1);
  366.                     SetTimerEx("Animation",2500,0,"dd",playerid,4);
  367.                     GivePlayerMoney(playerid,-WEAPONCOST);
  368.                     CallRemoteFunction("OnRatMachineUse","dd",playerid,1);
  369.                 }
  370.             }
  371.             if ((VendingType[i] == 2) && (UsingPoker[playerid] == 0))
  372.             {
  373.                 new Float:x, Float:y, Float:z;
  374.                 GetObjectPos(i,x,y,z);
  375.                 if (IsPlayerInRangeOfPoint(playerid,1.0,x,y,z+1))
  376.                 {
  377.                     GetXYInFrontOfObject(i,x,y,-0.7);
  378.                     z = z+1;
  379.                     SetPlayerPos(playerid,x,y,z);
  380.                     GetObjectRot(i,x,y,z);
  381.                     SetPlayerFacingAngle(playerid,z);
  382.                     ApplyAnimation(playerid,"CASINO","Slot_bet_01",1.4,0,0,0,0,3000,1);
  383.                     SetTimerEx("Animation",3000,0,"dd",playerid,5);
  384.                     GivePlayerMoney(playerid,-POKERCOST);
  385.                     CallRemoteFunction("OnRatMachineUse","dd",playerid,2);
  386.                     UsingPoker[playerid] = 1;
  387.                 }
  388.             }
  389.             if ((VendingType[i] == 3) && (UsingATM[playerid] == 0))
  390.             {
  391.                 new Float:x, Float:y, Float:z;
  392.                 GetObjectPos(i,x,y,z);
  393.                 if (IsPlayerInRangeOfPoint(playerid,1.0,x,y,z+0.4))
  394.                 {
  395.                     GetXYInFrontOfObject(i,x,y,-0.88);
  396.                     z = z+0.4;
  397.                     SetPlayerPos(playerid,x,y,z);
  398.                     GetObjectRot(i,x,y,z);
  399.                     SetPlayerFacingAngle(playerid,z);
  400.                     TogglePlayerControllable(playerid,0);
  401.                     ApplyAnimation(playerid,"CASINO","Slot_bet_01",1.4,1,0,0,1,0,1);
  402.                     SetTimerEx("Animation",3000,0,"dd",playerid,6);
  403.                     CallRemoteFunction("OnRatMachineUse","dd",playerid,3);
  404.                     UsingATM[playerid] = 1;
  405.                 }
  406.             }
  407.             if ((VendingType[i] == 3) && (UsingATM[playerid] == 1))
  408.             {
  409.                 if (MenuID[playerid] == 1)
  410.                 {
  411.                     new msg[512];
  412.                     if (PlayerATMLine[playerid] == 1)
  413.                     {
  414.                         format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  415.                         TextDrawSetString(ATM[playerid],msg);
  416.                         MenuID[playerid] = 2;
  417.                     }
  418.                     if (PlayerATMLine[playerid] == 2)
  419.                     {
  420.                         format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  421.                         TextDrawSetString(ATM[playerid],msg);
  422.                         MenuID[playerid] = 3;
  423.                     }
  424.                     if (PlayerATMLine[playerid] == 3)
  425.                     {
  426.                         TextDrawHideForAll(ATM[playerid]);
  427.                         MenuID[playerid] = 0;
  428.                         UsingATM[playerid] = 0;
  429.                         ClearAnimations(playerid,1);
  430.                         TogglePlayerControllable(playerid,1);
  431.                     }
  432.                     return 1;
  433.                 }
  434.                 if (MenuID[playerid] == 3)
  435.                 {
  436.                     new money = GetPlayerMoney(playerid);
  437.                     new msg[512];
  438.                     if (PlayerATMLine[playerid] == 1)if (money >= 100) BankMoney[playerid] += 100, GivePlayerMoney(playerid,-100);
  439.                     if (PlayerATMLine[playerid] == 2)if (money >= 500) BankMoney[playerid] += 500, GivePlayerMoney(playerid,-500);
  440.                     if (PlayerATMLine[playerid] == 3)if (money >= 1000) BankMoney[playerid] += 1000, GivePlayerMoney(playerid,-1000);
  441.                     if (PlayerATMLine[playerid] == 4)if (money >= 5000) BankMoney[playerid] += 5000, GivePlayerMoney(playerid,-5000);
  442.                     if (PlayerATMLine[playerid] == 5)if (money >= 10000) BankMoney[playerid] += 10000, GivePlayerMoney(playerid,-10000);
  443.                     if (PlayerATMLine[playerid] == 6)if (money >= 50000) BankMoney[playerid] += 50000, GivePlayerMoney(playerid,-50000);
  444.                     if (PlayerATMLine[playerid] == 7)if (money >= 100000) BankMoney[playerid] += 100000, GivePlayerMoney(playerid,-100000);
  445.                     if (PlayerATMLine[playerid] == 8)if (money >= 500000) BankMoney[playerid] += 500000, GivePlayerMoney(playerid,-500000);
  446.                     if (PlayerATMLine[playerid] == 1)
  447.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  448.                     if (PlayerATMLine[playerid] == 2)
  449.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~-->500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  450.                     if (PlayerATMLine[playerid] == 3)
  451.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~-->1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  452.                     if (PlayerATMLine[playerid] == 4)
  453.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~-->5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  454.                     if (PlayerATMLine[playerid] == 5)
  455.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~-->10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  456.                     if (PlayerATMLine[playerid] == 6)
  457.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~-->50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  458.                     if (PlayerATMLine[playerid] == 7)
  459.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~-->100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  460.                     if (PlayerATMLine[playerid] == 8)
  461.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~-->500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  462.                     if (PlayerATMLine[playerid] == 9)
  463.                     {
  464.                         MenuID[playerid] = 1;
  465.                         format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->Take money out~n~   Deposit money ~n~   Exit             ~n~~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  466.                     }
  467.                     TextDrawSetString(ATM[playerid],msg);
  468.                     return 1;
  469.                 }
  470.                 if (MenuID[playerid] == 2)
  471.                 {
  472.                     new msg[512];
  473.                     if (PlayerATMLine[playerid] == 1)if (BankMoney[playerid] >= 100) BankMoney[playerid] -= 100, GivePlayerMoney(playerid,100);
  474.                     if (PlayerATMLine[playerid] == 2)if (BankMoney[playerid] >= 500) BankMoney[playerid] -= 500, GivePlayerMoney(playerid,500);
  475.                     if (PlayerATMLine[playerid] == 3)if (BankMoney[playerid] >= 1000) BankMoney[playerid] -= 1000, GivePlayerMoney(playerid,1000);
  476.                     if (PlayerATMLine[playerid] == 4)if (BankMoney[playerid] >= 5000) BankMoney[playerid] -= 5000, GivePlayerMoney(playerid,5000);
  477.                     if (PlayerATMLine[playerid] == 5)if (BankMoney[playerid] >= 10000) BankMoney[playerid] -= 10000, GivePlayerMoney(playerid,10000);
  478.                     if (PlayerATMLine[playerid] == 6)if (BankMoney[playerid] >= 50000) BankMoney[playerid] -= 50000, GivePlayerMoney(playerid,50000);
  479.                     if (PlayerATMLine[playerid] == 7)if (BankMoney[playerid] >= 100000) BankMoney[playerid] -= 100000, GivePlayerMoney(playerid,100000);
  480.                     if (PlayerATMLine[playerid] == 8)if (BankMoney[playerid] >= 500000) BankMoney[playerid] -= 500000, GivePlayerMoney(playerid,500000);
  481.                     if (PlayerATMLine[playerid] == 1)
  482.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  483.                     if (PlayerATMLine[playerid] == 2)
  484.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~-->500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  485.                     if (PlayerATMLine[playerid] == 3)
  486.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~-->1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  487.                     if (PlayerATMLine[playerid] == 4)
  488.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~-->5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  489.                     if (PlayerATMLine[playerid] == 5)
  490.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~-->10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  491.                     if (PlayerATMLine[playerid] == 6)
  492.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~-->50 000 ~n~   100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  493.                     if (PlayerATMLine[playerid] == 7)
  494.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~-->100 000$~n~   500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  495.                     if (PlayerATMLine[playerid] == 8)
  496.                     format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~-->500 000$~n~   Exit   ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  497.                     if (PlayerATMLine[playerid] == 9)
  498.                     {
  499.                         MenuID[playerid] = 1;
  500.                         format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->Take money out~n~   Deposit money ~n~   Exit             ~n~~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  501.                     }
  502.                     TextDrawSetString(ATM[playerid],msg);
  503.                     return 1;
  504.                 }
  505.             }
  506.         }
  507.     }
  508.     if ((newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT))
  509.     {
  510.         if (MenuID[playerid] == 1)
  511.         {
  512.             new msg[512];
  513.             PlayerATMLine[playerid]++;
  514.             if (PlayerATMLine[playerid] > 3) PlayerATMLine[playerid] = 1;
  515.             if (PlayerATMLine[playerid] == 1)
  516.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->Take money out~n~   Deposit money ~n~   Exit             ~n~~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  517.             if (PlayerATMLine[playerid] == 2)
  518.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   Take money out~n~-->Deposit money ~n~   Exit             ~n~~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  519.             if (PlayerATMLine[playerid] == 3)
  520.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   Take money out~n~   Deposit money ~n~-->Exit             ~n~~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  521.             TextDrawSetString(ATM[playerid],msg);
  522.             return 1;
  523.         }
  524.         if (MenuID[playerid] == 2)
  525.         {
  526.             new msg[512];
  527.             PlayerATMLine[playerid]++;
  528.             if (PlayerATMLine[playerid] > 9) PlayerATMLine[playerid] = 1;
  529.             if (PlayerATMLine[playerid] == 1)
  530.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  531.             if (PlayerATMLine[playerid] == 2)
  532.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~-->500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  533.             if (PlayerATMLine[playerid] == 3)
  534.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~-->1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  535.             if (PlayerATMLine[playerid] == 4)
  536.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~-->5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  537.             if (PlayerATMLine[playerid] == 5)
  538.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~-->10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  539.             if (PlayerATMLine[playerid] == 6)
  540.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~-->50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  541.             if (PlayerATMLine[playerid] == 7)
  542.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~-->100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  543.             if (PlayerATMLine[playerid] == 8)
  544.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~-->500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  545.             if (PlayerATMLine[playerid] == 9)
  546.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~-->Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  547.             TextDrawSetString(ATM[playerid],msg);
  548.             return 1;
  549.         }
  550.         if (MenuID[playerid] == 3)
  551.         {
  552.             new msg[512];
  553.             PlayerATMLine[playerid]++;
  554.             if (PlayerATMLine[playerid] > 9) PlayerATMLine[playerid] = 1;
  555.             if (PlayerATMLine[playerid] == 1)
  556.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~-->100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  557.             if (PlayerATMLine[playerid] == 2)
  558.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~-->500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  559.             if (PlayerATMLine[playerid] == 3)
  560.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~-->1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  561.             if (PlayerATMLine[playerid] == 4)
  562.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~-->5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  563.             if (PlayerATMLine[playerid] == 5)
  564.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~-->10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  565.             if (PlayerATMLine[playerid] == 6)
  566.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~-->50 000 ~n~   100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  567.             if (PlayerATMLine[playerid] == 7)
  568.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~-->100 000$~n~   500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  569.             if (PlayerATMLine[playerid] == 8)
  570.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~-->500 000$~n~   Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  571.             if (PlayerATMLine[playerid] == 9)
  572.             format(msg,512,"~n~RatMachines ATM~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Navigate by using ~k~~PED_SPRINT~ and select with ~k~~VEHICLE_ENTER_EXIT~~n~~n~   100$   ~n~   500$   ~n~   1000$  ~n~   5000$  ~n~   10 000$ ~n~   50 000 ~n~   100 000$~n~   500 000$~n~-->Exit    ~n~~n~~n~~n~~n~~n~Currently you have %d dollars in your bank account.~n~~n~~n~~n~~n~~n~~n~~n~",BankMoney[playerid]);
  573.             TextDrawSetString(ATM[playerid],msg);
  574.             return 1;
  575.         }
  576.     }
  577.     return 1;
  578. }
  579.  
  580. public OnPlayerSpawn(playerid)
  581. {
  582.     ApplyAnimation(playerid,"VENDING","null",1.4,0,1,1,0,0);
  583.     ApplyAnimation(playerid,"CASINO","null",1.4,0,1,1,0,0);
  584.     return 1;
  585. }
Advertisement
Add Comment
Please, Sign In to add comment