[Release][vRP][ESX] Slots | 5x3 slot machine | Animated | Sound Effects

for people that have problems with the vrp version its because the __resource.lua is not complete

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

ui_page 'html/ui.html'

client_scripts {
    'config.lua',
    'client.lua'
}

server_scripts {
    '@vrp/lib/utils.lua',
    'server.lua'
}

files {
  'html/ui.html',
  'html/script.js',
  'html/design.css',
  'html/img/black.png',
  'html/img/item1.png',
  'html/img/item2.png',
  'html/img/item3.png',
  'html/img/item4.png',
  'html/img/item5.png',
  'html/img/item6.png',
  'html/img/item7.png',
  'html/img/red.png',

  -- Audio

  'html/audio/alarma.wav',
  'html/audio/apasaButonul.wav',
  'html/audio/changeBet.wav',
  'html/audio/collect.wav',
  'html/audio/pornestePacanele.wav',
  'html/audio/seInvarte.wav',
  'html/audio/winDouble.wav',
  'html/audio/winLine.wav'
}

that should fix it

I have a problem, can you help me, please? (puteti sa ma ajutati daca sunteti romani, va rog?)

1 Like

Looks like you renamed the folder?

does someone have the contact details from the script owner ?

Anyone know how to make this use an item or black money rather than cash?

1 Like

its pretty easy
replace any add or remove money with:

     xPlayer.addInventoryItem("ITEM", amount)

or

   if xPlayer.getInventoryItem('ITEM').count >= bets then
                xPlayer.removeInventoryItem("ITEM",bets)

what part should i change ? dang ppl found the glitch and i need to change the number of row.
I tried to change the script.js to add the additional rows
something like this and its not working properly

var lines = [
[[0,0], [1,0], [2,0], [3,0], [4,0]],
[[0,1], [1,1], [2,1], [3,1], [4,1]],
[[0,2], [1,2], [2,2], [3,2], [4,2]],
[[0,0], [1,1], [2,2], [3,1], [4,0]],
[[0,0], [1,0], [2,2], [3,1], [4,0]],
[[0,0], [1,0], [2,2], [3,1], [4,0]],
[[0,0], [1,0], [2,2], [3,1], [4,0]],
[[0,0], [1,0], [2,2], [3,2], [4,2]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,2]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,1]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,0], [1,2], [2,2], [3,1], [4,0]],
[[0,2], [1,1], [2,0], [3,1], [4,0]]
];

any one know how to edit(add) the line?

when i add line players win in some strange situation…

I

I guess script.js
line 245

var table = [tbl1,tbl2,tbl3,tbl4,tbl5];
var cords = [crd1,crd2,crd3,crd4,crd5];

for(var k in lines) {
var wins = 0, last = table[lines[k][0][0]][lines[k][0][1]], lvl = 0, lasx;

for(var x = 1 in lines[k]) {
  //|| last == "Septar" || table[lines[k][x][0]][lines[k][x][1]] == "Septar"
  if(last == table[lines[k][x][0]][lines[k][x][1]]) {
    wins++;
    //if(table[lines[k][x][0]][lines[k][x][1]] !== "Septar") {
      last = table[lines[k][x][0]][lines[k][x][1]];
    //}
  }
  else break;
}

switch (wins) {
  case 2:
    if(last == 1) {
      lvl = 1;
      setTimeout(playAudio, 3950, "winLine");
    }
    break;
  case 3:
    lvl = 1;
    setTimeout(playAudio, 3950, "winLine");
    break;
  case 4:
    lvl = 2;
    setTimeout(playAudio, 3200 + 700 + 0.3 * k * 1000, "alarma");
    break;
  case 5:
    lvl = 2;
    setTimeout(playAudio, 3200 + 0.3 * k * 1000, "alarma");
    break;
  default: 0;
}
if(lvl > 0) {
  winnings = winnings + bet * winTable[table[lines[k][wins-1][0]][lines[k][wins-1][1]]][wins-1];
  setTimeout(endWithWin, 4400, winnings, 0);
}

for(var p = wins - 1; p >= 0; p--) {
  setTimeout(setWinner, 3200 + 0.4 * p * 1000 + 0.3 * k * 1000, cords[lines[k][p][0]][lines[k][p][1]], lvl);
}

}

should be some how edited after add more lines?

I have fixed the freeze bug after pressing ESC on ESX version. Here is the fix. So it’s in client.lua

This is the broken code

-------------------------------------------------------------------------------
-- NUI CALLBACKS
-------------------------------------------------------------------------------
RegisterNUICallback('exitWith', function(data, cb)
	cb('ok')
	SetNuiFocus(false, false)
	open = false
	TriggerServerEvent("esx_slots:PayOutRewards", data.coinAmount)
end)

Change it to this. I only switched the “hasCursor” from false to true.

-------------------------------------------------------------------------------
-- NUI CALLBACKS
-------------------------------------------------------------------------------
RegisterNUICallback('exitWith', function(data, cb)
	cb('ok')
	SetNuiFocus(false, true)
	open = false
	TriggerServerEvent("esx_slots:PayOutRewards", data.coinAmount)
end)

There you go :wink:

1 Like

i also stop but i cant find SetNuiFocus problem, would you check my server.cfg? then i will try to stop that
resourceserver.cfg (5.6 KB)

Hello, can someone help my find ( how to reduce winnings ) ?

In vrp_slots/html/script.js

you will find

var winTable = [
  [0],
  [1,1,3,5,10], // Cherry
  [1,1,4,10,15], // Plum
  [1,1,4,10,15], // Lemon
  [1,1,4,10,15], // Orange
  [1,1,10,20,50], // Grapes
  [1,1,10,20,50], // Watermellon
  [1,1,20,150,600] // Seven
];

You can modify the win multiply for each fruit
The first 0 it’s not important
each line represents the succession of multiplications depending on how many fruits at the same time are trapped in a line
For example: in Orange if you catch 3 in a row the multiply will be x4, if you catch 5 then it will be x15.

1 Like

Thanks!!!

How do I make it so that the player looses dirty cash to play but gets clean cash if they win ?

by editing the code?

can i play with dirty money and pay out the cash?

why will the multyplier be x40 if you get 5 Oranges i dont really understand it

I edited now, corect is x15 not x40

guys did someone solve the problem of the freeze when u press ESC?
I steel have that problem :frowning: can someone help me?