Wysłany: 2020-07-04, 20:18
StifMaster
Wiek: 30 Na forum: 3525 dni Posty: 57
Nick w MP: Sztefi
Piwa : 5
Cze??, przychodz? do Was z ruletk?. Czy jest mo?liwo?? aby pieni?dze z wygranej lecia?y od razu do bankomatu, a nie do kieszeni. A drugie pytanie to, czy mo?na gra? pieni?dzmi z bankomatu a nie kieszeni
c.lua
local sx , sy = guiGetScreenSize ()
local xres , yres = ( sx / 1920 ), ( sy / 1080 )
local font = dxCreateFont ( "archivo_narrow.ttf" , 18 )
tabela ={}
local sw , sh = guiGetScreenSize ()
show = false
function showgui ( hitPlayer , matchingDimension )
if getElementData ( source , "kasynomarker" ) then
if hitPlayer == localPlayer then
show = true
guiSetVisible ( edit , true )
showCursor ( true , false )
end
end
end
addEventHandler ( "onClientMarkerHit" , getRootElement (), showgui )
function hidegui ( leavingPlayer )
if getElementData ( source , "kasynomarker" ) then
if leavingPlayer == localPlayer then
show = false
guiSetVisible ( edit , false )
showCursor ( false )
end
end
end
addEventHandler ( "onClientMarkerLeave" , getRootElement (), hidegui )
function isMouseInPosition ( x , y , w , h )
if not isCursorShowing () then return end
local mouse = { getCursorPosition ()}
local myX , myY = ( mouse [ 1 ] * sw ), ( mouse [ 2 ] * sh )
if ( myX >= x and myX <= ( x + w )) and ( myY >= y and myY <= ( y + h )) then
return true
end
return false
end
local click = false
function onClick ( x , y , w , h , called )
if( isMouseInPosition ( x , y , w , h ) and not click and getKeyState ( "mouse1" )) then
click = true
called ()
elseif( not getKeyState ( "mouse1" ) and click ) then
click = false
end
end
-- tworzenie listy
for i = 1 , 6 do
table . insert ( tabela ,{ 0 , 0 , 200 , 0 , "zielone" , "x14" })
table . insert ( tabela ,{ 1 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 2 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 3 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 4 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 5 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 6 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 7 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 8 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 9 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 10 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 11 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 12 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 13 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 14 , 0 , 0 , 0 , "czarne" , "x2" })
end -- do listy
betyr ={}
betyb ={}
betyg ={}
iloscokienek = 75
czas = 4000
kolejnelosowanie = 0
kolejnelosowaniestart = 0
-- kolejnelosowanie = getTickCount ()+ 10000
function roundedRectangle ( x , y , w , h , borderColor , bgColor , postGUI )
if ( x and y and w and h ) then
if ( not borderColor ) then
borderColor = tocolor ( 0 , 0 , 0 , 200 );
end
if ( not bgColor ) then
bgColor = borderColor ;
end
--- Background
dxDrawRectangle ( x , y , w , h , bgColor , postGUI );
--- Border
dxDrawRectangle ( x + 2 , y - 1 , w - 4 , 1 , borderColor , postGUI ); -- top
dxDrawRectangle ( x + 2 , y + h , w - 4 , 1 , borderColor , postGUI ); -- bottom
dxDrawRectangle ( x - 1 , y + 2 , 1 , h - 4 , borderColor , postGUI ); -- left
dxDrawRectangle ( x + w , y + 2 , 1 , h - 4 , borderColor , postGUI ); -- right
end
end
function betowanie ()
local kwota = guiGetText ( edit )
if mozliwybet then
if tonumber ( kwota ) and getPlayerMoney ( localPlayer ) >= tonumber ( kwota ) and tonumber ( kwota ) > 0 and not string . find ( kwota , "%D" ) then
if( isMouseInPosition ( xres * 565 , yres * 440 , xres * 260 , yres * 30 )) then
kolor = "red"
end
if( isMouseInPosition ( xres * 830 , yres * 440 , xres * 260 , yres * 30 )) then
kolor = "black"
end
if( isMouseInPosition ( xres * 1095 , yres * 440 , xres * 260 , yres * 30 )) then
kolor = "green"
end
triggerServerEvent ( "betowanietos" , localPlayer , kolor , kwota )
end
end
end
function betowaniefroms ( kolor , kwota )
ilosc = 0
if kolor == "red" then
for i , v in pairs ( betyr ) do
if betyr [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyr [ i ][ 2 ]
table . remove ( betyr , i )
end
end
table . insert ( betyr ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
table . sort ( betyr , function( a , b ) return a [ 2 ]> b [ 2 ] end )
end
if kolor == "black" then
for i , v in pairs ( betyb ) do
if betyb [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyb [ i ][ 2 ]
table . remove ( betyb , i )
end
end
table . insert ( betyb ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
table . sort ( betyb , function( a , b ) return a [ 2 ]> b [ 2 ] end )
end
if kolor == "green" then
for i , v in pairs ( betyg ) do
if betyg [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyg [ i ][ 2 ]
table . remove ( betyg , i )
end
end
table . insert ( betyg ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
table . sort ( betyg , function( a , b ) return a [ 2 ]> b [ 2 ] end )
end
end
addEvent ( "betowanietoc" , true )
addEventHandler ( "betowanietoc" , getRootElement (), betowaniefroms )
ruletkapola = dxCreateRenderTarget ( xres * 800 , yres * 70 , true )
ruletkabety = dxCreateRenderTarget ( xres * 800 , yres * 196 , true )
start = getTickCount ()
koniec = getTickCount ()
random = 15
edit = guiCreateEdit ( xres * 565 , yres * 390 , xres * 790 , yres * 40 , "" , false )
guiSetVisible ( edit , false )
function draw ()
if show then
x = 70 * 6.21
roundedRectangle ( xres * 560 , yres * 210 , xres * 800 , yres * 470 , tocolor ( 0 , 0 , 0 , 180 ))
roundedRectangle ( xres * 560 , yres * 210 , xres * 800 , yres * 470 , tocolor ( 255 , 255 , 255 , 20 ))
aktualnyczas = getTickCount ()
if aktualnyczas > kolejnelosowanie then
text = "Losowanie trwa"
napelnienie = ( 790 / 100 )* 0
else
zailelosowanie = ( kolejnelosowanie - aktualnyczas )/ 1000
zailelosowanie = string . format ( "%.0f" , zailelosowanie )
text = "Kolejne losowanie za " .. zailelosowanie .. ""
napelnienie = ( 790 / 100 )*( 10 * zailelosowanie )
end
roundedRectangle ( xres * 565 , yres * 250 , xres * 790.0 , yres * 20 , tocolor ( 25 , 25 , 25 , 190 ))
local postepodliczania = ( aktualnyczas - kolejnelosowaniestart )/( kolejnelosowanie - kolejnelosowaniestart )
odliczaniepasek = interpolateBetween ( yres * 790 , 0 , 0 , yres * 0 , 0 , 0 , postepodliczania , 'OutQuad' )
if odliczaniepasek > 0 then
roundedRectangle ( xres * 565 , yres * 250 , xres * odliczaniepasek , yres * 20 , tocolor ( 200 , 0 , 0 , 230 )) -- napelnienie\
end
dxDrawText ( "" .. text .. "" , xres * 560 + 2 , yres * 215 + 0.5 , xres * 1360.0 , yres * 220 + 30 , tocolor ( 0 , 0 , 0 , 200 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. text .. "" , xres * 560 , yres * 215 , xres * 1360.0 , yres * 220 + 30 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.8 , font , "center" , "center" , true )
local postep = ( getTickCount ()- start )/( koniec - start )
przesuniecie = interpolateBetween (- 15 * 70 , 0 , 0 , yres *- random * 70 , 0 , 0 , postep , 'OutQuad' )
local kasa = getPlayerMoney ( localPlayer )
dxDrawText ( "Balans : " .. kasa .. "$" , xres * 565 + 2 , yres * 350 + 0.5 , xres * 565 + 790 , yres * 350 + 40 , tocolor ( 0 , 0 , 0 , 150 ), yres * 0.7 , font , "center" , "center" , true )
dxDrawText ( "Balans : " .. kasa .. "$" , xres * 565 , yres * 350 , xres * 565 + 790 , yres * 350 + 40 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.7 , font , "center" , "center" , true )
-- roundedRectangle ( xres * 565 , yres * 390 , xres * 790 , yres * 40 , tocolor ( 250 , 255 , 255 , 30 )) -- edit
roundedRectangle ( xres * 565 , yres * 440 , xres * 260 , yres * 30 , tocolor ( 250 , 0 , 0 , 160 )) -- bet r
dxDrawText ( "Czerwone x2" , xres * 565 + 2 , yres * 440 + 0.5 , xres * 565 + 260 , yres * 440 + 30 , tocolor ( 0 , 0 , 0 , 200 ), yres * 0.7 , font , "center" , "center" , true )
dxDrawText ( "Czerwone x2" , xres * 565 , yres * 440 , xres * 565 + 260 , yres * 440 + 30 , tocolor ( 255 , 255 , 255 , 220 ), yres * 0.7 , font , "center" , "center" , true )
onClick ( xres * 565 , yres * 440 , xres * 260 , yres * 30 , function()
betowanie ()
end )
roundedRectangle ( xres * 830 , yres * 440 , xres * 260 , yres * 30 , tocolor ( 0 , 0 , 0 , 160 )) -- bet b
dxDrawText ( "Czarne x2" , xres * 830 + 2 , yres * 440 + 0.5 , xres * 830 + 260 , yres * 440 + 30 , tocolor ( 0 , 0 , 0 , 200 ), yres * 0.7 , font , "center" , "center" , true )
dxDrawText ( "Czarne x2" , xres * 830 , yres * 440 , xres * 830 + 260 , yres * 440 + 30 , tocolor ( 255 , 255 , 255 , 220 ), yres * 0.7 , font , "center" , "center" , true )
onClick ( xres * 830 , yres * 440 , xres * 260 , yres * 30 , function()
betowanie ()
end )
roundedRectangle ( xres * 1095 , yres * 440 , xres * 260 , yres * 30 , tocolor ( 0 , 200 , 0 , 160 )) -- bet g
dxDrawText ( "Zielone x14" , xres * 1095 + 2 , yres * 440 + 0.5 , xres * 1095 + 260 , yres * 440 + 30 , tocolor ( 0 , 0 , 0 , 200 ), yres * 0.7 , font , "center" , "center" , true )
dxDrawText ( "Zielone x14" , xres * 1095 , yres * 440 , xres * 1095 + 260 , yres * 440 + 30 , tocolor ( 255 , 255 , 255 , 220 ), yres * 0.7 , font , "center" , "center" , true )
onClick ( xres * 1095 , yres * 440 , xres * 260 , yres * 30 , function()
betowanie ()
end )
-- bety
dxSetRenderTarget ( ruletkabety , true )
betyx = 5
suma = 0
betyy = 38
for i , v in pairs ( betyr ) do
suma = suma + betyr [ i ][ 2 ]
dxDrawRectangle ( xres * betyx , yres * betyy , xres * 260.0 , yres * 30 , tocolor ( 0 , 0 , 0 , 150 ))
dxDrawText ( "" .. betyr [ i ][ 1 ].. " - " .. betyr [ i ][ 2 ].. "" , xres * betyx + 2 , yres * betyy + 0.5 , xres * betyx + 260 , yres * betyy + 30 , tocolor ( 0 , 0 , 0 , 120 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. betyr [ i ][ 1 ].. " - " .. betyr [ i ][ 2 ].. "" , xres * betyx , yres * betyy , xres * betyx + 260 , yres * betyy + 30 , tocolor ( 255 , 255 , 255 , 250 ), yres * 0.8 , font , "center" , "center" , true )
betyy = betyy + 32
end
dxDrawRectangle ( xres * betyx , yres * 0 , xres * 260.0 , yres * 35 , tocolor ( 255 , 0 , 0 , 210 ))
dxDrawText ( "" .. suma .. "" , xres * betyx + 2 , yres * 0 + 0.5 , xres * betyx + 260.0 , yres * 35 , tocolor ( 0 , 0 , 0 , 150 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. suma .. "" , xres * betyx , yres * 0 , xres * betyx + 260.0 , yres * 35 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.8 , font , "center" , "center" , true )
betyx = 260 + 10
suma = 0
betyy = 38
for i , v in pairs ( betyb ) do
suma = suma + betyb [ i ][ 2 ]
dxDrawRectangle ( xres * betyx , yres * betyy , xres * 260 , yres * 30 , tocolor ( 0 , 0 , 0 , 150 ))
dxDrawText ( "" .. betyb [ i ][ 1 ].. " - " .. betyb [ i ][ 2 ].. "" , xres * betyx + 2 , yres * betyy + 0.5 , xres * betyx + 260 , yres * betyy + 30 , tocolor ( 0 , 0 , 0 , 120 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. betyb [ i ][ 1 ].. " - " .. betyb [ i ][ 2 ].. "" , xres * betyx , yres * betyy , xres * betyx + 260 , yres * betyy + 30 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.8 , font , "center" , "center" , true )
betyy = betyy + 32
end
dxDrawRectangle ( xres * betyx , yres * 0 , xres * 260.0 , yres * 35 , tocolor ( 0 , 0 , 0 , 210 ))
dxDrawText ( "" .. suma .. "" , xres * betyx + 2 , yres * 0 + 0.5 , xres * betyx + 260.0 , yres * 35 , tocolor ( 0 , 0 , 0 , 150 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. suma .. "" , xres * betyx , yres * 0 , xres * betyx + 260.0 , yres * 35 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.8 , font , "center" , "center" , true )
betyx = 260 + 260 + 15
suma = 0
betyy = 38
for i , v in pairs ( betyg ) do
suma = suma + betyg [ i ][ 2 ]
dxDrawRectangle ( xres * betyx , yres * betyy , xres * 260.0 , yres * 30 , tocolor ( 0 , 0 , 0 , 150 ))
dxDrawText ( "" .. betyg [ i ][ 1 ].. " - " .. betyg [ i ][ 2 ].. "" , xres * betyx + 2 , yres * betyy + 0.5 , xres * betyx + 260 , yres * betyy + 30 , tocolor ( 0 , 0 , 0 , 120 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. betyg [ i ][ 1 ].. " - " .. betyg [ i ][ 2 ].. "" , xres * betyx , yres * betyy , xres * betyx + 260 , yres * betyy + 30 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.8 , font , "center" , "center" , true )
betyy = betyy + 32
end
dxDrawRectangle ( xres * betyx , yres * 0 , xres * 260.0 , yres * 35 , tocolor ( 0 , 200 , 0 , 210 ))
dxDrawText ( "" .. suma .. "" , xres * betyx + 2 , yres * 0 + 0.5 , xres * betyx + 260.0 , yres * 35 , tocolor ( 0 , 0 , 0 , 150 ), yres * 0.8 , font , "center" , "center" , true )
dxDrawText ( "" .. suma .. "" , xres * betyx , yres * 0 , xres * betyx + 260.0 , yres * 35 , tocolor ( 255 , 255 , 255 , 255 ), yres * 0.8 , font , "center" , "center" , true )
dxSetRenderTarget ()
dxSetRenderTarget ( ruletkapola , true )
for i , v in pairs ( tabela ) do
dxDrawRectangle ( xres * x + przesuniecie , yres * 0 , xres * 70.0 , yres * 70 , tocolor ( v [ 2 ], v [ 3 ], v [ 4 ], 220 ) )
dxDrawText ( "" .. v [ 1 ].. "" , xres * x + przesuniecie , yres * 0 + 50 , xres * x + przesuniecie + 70 , yres * 70 , tocolor ( 255 , 255 , 255 , 240 ), yres * 1.0 , "default-bold" , "center" , "center" , true )
x = x + 70
end
dxSetRenderTarget ()
dxDrawImage ( xres * 560 , yres * 280 , xres * 800.0 , yres * 70 , ruletkapola )
dxDrawImage ( xres * 560 , yres * 482 , xres * 800.0 , yres * 196 , ruletkabety )
dxDrawRectangle ( xres * 959.6 , yres * 280 , xres * 0.8 , yres * 45 , tocolor ( 255 , 255 , 255 , 255 ) )
end
end
addEventHandler ( "onClientRender" , getRootElement (), draw )
-- outputChatBox ( "wylosowales = " .. tabela [ random ][ 1 ].. " " .. tabela [ random ][ 5 ].. "$ ( " .. random .. " okienko )" )
function rollowanie ( liczba )
random = liczba
start = getTickCount ()
koniec = getTickCount ()+ czas
mozliwybet = false
setTimer (function()
kolejnelosowaniestart = getTickCount ()
kolejnelosowanie = getTickCount ()+ 10000
mozliwybet = true
betyr ={}
betyb ={}
betyg ={}
end , czas , 1 )
end
addEvent ( "losowanieliczb" , true )
addEventHandler ( "losowanieliczb" , getRootElement (), rollowanie )
mozliwybet = true
s.lua
wysokibetinfo = 50000
tabela ={}
-- tworzenie listy
for i = 1 , 6 do
table . insert ( tabela ,{ 0 , 0 , 200 , 0 , "zielone" , "x12" })
table . insert ( tabela ,{ 1 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 2 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 3 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 4 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 5 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 6 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 7 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 8 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 9 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 10 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 11 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 12 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 13 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 14 , 0 , 0 , 0 , "czarne" , "x2" })
end -- do listy
betyr ={}
betyb ={}
betyg ={}
---- outputChatBox ( "wylosowales = " .. tabela [ random ][ 1 ].. " " .. tabela [ random ][ 5 ].. "$ ( " .. random .. " okienko )" )
function infowygrana ( osoba , kolor , ilosc )
if ilosc >= wysokibetinfo then
outputChatBox ( "#ff5000[Ruletka]#ffffff Gracz " .. getPlayerName ( osoba ).. " postawi? na " .. kolor .. "#ffffff i wygra? " .. ilosc .. "$ !" , all , 255 , 255 , 255 , true )
end
end
function rollowanie ()
losowaliczba = math . random ( 45 , 75 )
triggerClientEvent ( "losowanieliczb" , root , losowaliczba )
setTimer (function()
if tabela [ losowaliczba ][ 5 ] == "czerwone" then
for i , v in pairs ( betyr ) do
wygrana = betyr [ i ][ 2 ]* 2
local gracz = getPlayerFromName ( betyr [ i ][ 1 ])
if gracz then
givePlayerMoney ( gracz , wygrana )
infowygrana ( gracz , "#ff0000czerwone" , wygrana )
end
end
betyr ={}
betyb ={}
betyg ={}
end -- do koloru wygranego
if tabela [ losowaliczba ][ 5 ] == "czarne" then
for i , v in pairs ( betyb ) do
wygrana = betyb [ i ][ 2 ]* 2
local gracz = getPlayerFromName ( betyb [ i ][ 1 ])
if gracz then
givePlayerMoney ( gracz , wygrana )
infowygrana ( gracz , "#6d6d6dczarne" , wygrana )
end
end
betyr ={}
betyb ={}
betyg ={}
end -- do koloru wygranego
if tabela [ losowaliczba ][ 5 ] == "zielone" then
for i , v in pairs ( betyg ) do
wygrana = betyg [ i ][ 2 ]* 14
local gracz = getPlayerFromName ( betyg [ i ][ 1 ])
if gracz then
givePlayerMoney ( gracz , wygrana )
infowygrana ( gracz , "#00c800zielone" , wygrana )
-- outputChatBox ( "" .. betyg [ i ][ 1 ].. " wygrywa " .. wygrana .. "" )
end
end
betyr ={}
betyb ={}
betyg ={}
end -- do koloru wygranego
end , 4000 , 1 )
-- outputChatBox ( "wylosowales = " .. tabela [ losowaliczba ][ 1 ].. " " .. tabela [ losowaliczba ][ 5 ].. "$ ( " .. losowaliczba .. " okienko )" )
end
setTimer ( rollowanie , 14000 , 0 )
function betowanie ( kolor , kwota )
local kasa = getPlayerMoney ( source )
if tonumber ( kwota )<= kasa then
takePlayerMoney ( source , kwota )
ilosc = 0
if kolor == "red" then
for i , v in pairs ( betyr ) do
if betyr [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyr [ i ][ 2 ]
table . remove ( betyr , i )
end
end
table . insert ( betyr ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
triggerClientEvent ( "betowanietoc" , source , kolor , kwota )
end
if kolor == "black" then
for i , v in pairs ( betyb ) do
if betyb [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyb [ i ][ 2 ]
table . remove ( betyb , i )
end
end
table . insert ( betyb ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
triggerClientEvent ( "betowanietoc" , source , kolor , kwota )
end
if kolor == "green" then
for i , v in pairs ( betyg ) do
if betyg [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyg [ i ][ 2 ]
table . remove ( betyg , i )
end
end
table . insert ( betyg ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
triggerClientEvent ( "betowanietoc" , source , kolor , kwota )
end
end
end
addEvent ( "betowanietos" , true )
addEventHandler ( "betowanietos" , getRootElement (), betowanie )
Wysłany: 2020-07-04, 20:40
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Wystarczy wykona? odpowiednie zapytanie do MySQL z funkcj? UPDATE lub SELECT.
Wysłany: 2020-07-04, 20:43
StifMaster
Wiek: 30 Na forum: 3525 dni Posty: 57
Nick w MP: Sztefi
Piwa : 5
"Wilq" napisał/a :Wystarczy wykona? odpowiednie zapytanie do MySQL z funkcj? UPDATE lub SELECT.
Dasz rad? to wykona? :? Z g?ry dzi?ki.
Wysłany: 2020-07-04, 20:55
xyzzzikk
.gg
Wiek: 18 Na forum: 2774 dni Posty: 175
Nick w MP: aspyk
Piwa : 6499
Polecam ci pobra? skrypt https://gtao.pl/<font-colorcccc99>skrypt<-font>-kasa-bank-vt135732.htm
oraz zmieni? kod w nast?puj?cy spos?b
server:
wysokibetinfo = 50000
tabela ={}
-- tworzenie listy
for i = 1 , 6 do
table . insert ( tabela ,{ 0 , 0 , 200 , 0 , "zielone" , "x12" })
table . insert ( tabela ,{ 1 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 2 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 3 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 4 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 5 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 6 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 7 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 8 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 9 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 10 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 11 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 12 , 0 , 0 , 0 , "czarne" , "x2" })
table . insert ( tabela ,{ 13 , 255 , 0 , 0 , "czerwone" , "x2" })
table . insert ( tabela ,{ 14 , 0 , 0 , 0 , "czarne" , "x2" })
end -- do listy
betyr ={}
betyb ={}
betyg ={}
---- outputChatBox ( "wylosowales = " .. tabela [ random ][ 1 ].. " " .. tabela [ random ][ 5 ].. "$ ( " .. random .. " okienko )" )
function infowygrana ( osoba , kolor , ilosc )
if ilosc >= wysokibetinfo then
outputChatBox ( "#ff5000[Ruletka]#ffffff Gracz " .. getPlayerName ( osoba ).. " postawi? na " .. kolor .. "#ffffff i wygra? " .. ilosc .. "$ !" , all , 255 , 255 , 255 , true )
end
end
function rollowanie ()
losowaliczba = math . random ( 45 , 75 )
triggerClientEvent ( "losowanieliczb" , root , losowaliczba )
setTimer (function()
if tabela [ losowaliczba ][ 5 ] == "czerwone" then
for i , v in pairs ( betyr ) do
wygrana = betyr [ i ][ 2 ]* 2
local gracz = getPlayerFromName ( betyr [ i ][ 1 ])
if gracz then
-- givePlayerMoney ( gracz , wygrana )
exports [ "YNE-KasaBank" ]: givePlayerBankMoney ( gracz , wygrana )
infowygrana ( gracz , "#ff0000czerwone" , wygrana )
end
end
betyr ={}
betyb ={}
betyg ={}
end -- do koloru wygranego
if tabela [ losowaliczba ][ 5 ] == "czarne" then
for i , v in pairs ( betyb ) do
wygrana = betyb [ i ][ 2 ]* 2
local gracz = getPlayerFromName ( betyb [ i ][ 1 ])
if gracz then
exports [ "YNE-KasaBank" ]: givePlayerBankMoney ( gracz , wygrana )
infowygrana ( gracz , "#6d6d6dczarne" , wygrana )
end
end
betyr ={}
betyb ={}
betyg ={}
end -- do koloru wygranego
if tabela [ losowaliczba ][ 5 ] == "zielone" then
for i , v in pairs ( betyg ) do
wygrana = betyg [ i ][ 2 ]* 14
local gracz = getPlayerFromName ( betyg [ i ][ 1 ])
if gracz then
-- ivePlayerMoney ( gracz , wygrana )
exports [ "YNE-KasaBank" ]: givePlayerBankMoney ( gracz , wygrana )
infowygrana ( gracz , "#00c800zielone" , wygrana )
-- outputChatBox ( "" .. betyg [ i ][ 1 ].. " wygrywa " .. wygrana .. "" )
end
end
betyr ={}
betyb ={}
betyg ={}
end -- do koloru wygranego
end , 4000 , 1 )
-- outputChatBox ( "wylosowales = " .. tabela [ losowaliczba ][ 1 ].. " " .. tabela [ losowaliczba ][ 5 ].. "$ ( " .. losowaliczba .. " okienko )" )
end
setTimer ( rollowanie , 14000 , 0 )
function betowanie ( kolor , kwota )
local kasa = getPlayerMoney ( source )
if tonumber ( kwota )<= kasa then
-- takePlayerMoney ( source , kwota )
exports [ "YNE-KasaBank" ]: givePlayerBankMoney ( source , kwota )
ilosc = 0
if kolor == "red" then
for i , v in pairs ( betyr ) do
if betyr [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyr [ i ][ 2 ]
table . remove ( betyr , i )
end
end
table . insert ( betyr ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
triggerClientEvent ( "betowanietoc" , source , kolor , kwota )
end
if kolor == "black" then
for i , v in pairs ( betyb ) do
if betyb [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyb [ i ][ 2 ]
table . remove ( betyb , i )
end
end
table . insert ( betyb ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
triggerClientEvent ( "betowanietoc" , source , kolor , kwota )
end
if kolor == "green" then
for i , v in pairs ( betyg ) do
if betyg [ i ][ 1 ] == getPlayerName ( source ) then
ilosc = betyg [ i ][ 2 ]
table . remove ( betyg , i )
end
end
table . insert ( betyg ,{ "" .. getPlayerName ( source ).. "" , tonumber ( kwota + ilosc )})
triggerClientEvent ( "betowanietoc" , source , kolor , kwota )
end
end
end
addEvent ( "betowanietos" , true )
addEventHandler ( "betowanietos" , getRootElement (), betowanie )
Wysłany: 2020-07-06, 13:43
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
"StifMaster" napisał/a : "Wilq" napisał/a :Wystarczy wykona? odpowiednie zapytanie do MySQL z funkcj? UPDATE lub SELECT.
Dasz rad? to wykona? :? Z g?ry dzi?ki.
Forum jest od pomocy nie od wyr?czania, edycja plik?w podchodzi ju? pod p?atne zlecenia. zapoznaj si? z funkcjami dbQuery i kwerend? SELECT, UPDATE, INSERT. Podmie? zapytanie dbQuery zamiast givePlayerMoney.
Tagi: ruletka
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: