Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: kasa
1. Kasa do banku
Jak zrobi? ?eby kasa lecia?a do banku?

[lua]sianko = math.random(30000,38000)
function rgbToHex(red, green, blue, alpha)
if( ( red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255 ) or ( alpha and ( alpha < 0 or alpha > 255 ) ) ) then
return nil
end
if alpha then
return string.format("#%.2X%.2X%.2X%.2X", red, green, blue, alpha)
else
return string.format("#%.2X%.2X%.2X", red, green, blue)
end
end
kordy = math.random(1,20)
if kordy == 1 then
x,y,z = 571.86, -1743.04, 12.40
elseif kordy == 2 then
x,y,z = -1993.66, 495.93, 35.17-1
elseif kordy == 3 then
x,y,z = -1734.76, 879.55, 25.09
elseif kordy == 4 then
x,y,z = -1672.76, 1206.60, 32.94
elseif kordy == 5 then
x,y,z = -1954.63, 1229.69, 31.65
elseif kordy == 6 then
x,y,z = -2472.77, 1070.43, 55.79
elseif kordy == 7 then
x,y,z = 1087.37, -1764.54, 13.36
elseif kordy == 8 then
x,y,z = 1488.79, -1675.96, 14.05
elseif kordy == 9 then
x,y,z = -2534.11, 62.38, 9.16
elseif kordy == 10 then
x,y,z = 232.68, -1807.06, 4.48
elseif kordy == 11 then
x,y,z = -2508.71, -687.03, 139.32
elseif kordy == 12 then
x,y,z = -2345.68, 995.06, 50.90
elseif kordy == 13 then
x,y,z = -1777.59, 1308.74, 59.73
elseif kordy...
2. kasa w hudzie
Robie hud na serwer ale kasa mi sie nie odejmuje dopiero jak zrestartuje skrypt

Kod:

local kasa = getElementData(localPlayer, "pieniadze")


Kod:

dxDrawText(kasa.." PLN", screenW * 0.8147, screenH * 0.1927, screenW * 0.9485, screenH * 0.2174, tocolor(255, 255, 255, 255), 1.3, "default", "center", "center", false, false, false, false, false)
3. GTA 5 Online kasa
Bezpieczna kasa do GTA Online

Zdob?d? bezpieczne GTA$ w bezpiecznej sesji Money Drop

Przejrzysta i nowoczesna strona na kt?rej znajdziesz pe?ny opis i instrukcj?!

Zapraszam i polecam

https://moneydrop.pl/
4. kasa do bankomatu
Czesc, robie pseudola i chcialbym aby pieniadze z tego szly do bankomatu, tylko ze jak zrobie tak:

        gold math.random(150000,240000)
        
zwykly math.random(75000,120000)
        if 
getElementData(localPlayer,"player:gold"then
       
-- triggerServerEvent("givePlayerMoney"localPlayergold0)
       
exports["pystories-db"]:dbSet("UPDATE `pystories_users` SET `bank_money` = `bank_money` + ? WHERE `pystories_users`.`id` = ?"goldgetElementData(plr"player:sid"))
        
outputChatBox("* GOLD * Otrzymujesz "..gold.." PLN za zidentyfikowanie punktu.")
        else
        
triggerServerEvent("givePlayerMoney"localPlayerzwykly0)
        
outputChatBox("* NORMAL * Otrzymujesz "..zwykly.." PLN za zidentyfikowanie punktu.")


DB3:
ERROR: praca_svbus_c.lua:114: call: failed to call 'pystories-db:dbSet'[string"?"]
5. kasa lecąca do banku
Sprawa wygl?da tak, ?e tworz? export kt?ry pobiera pieni?dze z bankomatu gracza, przy pr?bie dodawania pieni?dzy w pracy do bankomatu - po prostu tej kasy nie dodaje.
addEvent("givePlayerMoney"true)
addEventHandler("givePlayerMoney"root, function(value,value2)
    if 
not tonumber(valuethen return end
    
if not getElementData(source,"player:logged"then return end
    local bankmoney 
exports["pystories-db"]:dbGet("SELECT `bank_money` FROM `pystories_users` WHERE `id` = ?"sid)
    
local kasabank 0
    
for iv in ipairs(bankmoney) do
        
kasabank v["bank_money"]
    
end

    exports
["pystories-db"]:dbSet("UPDATE `pystories_users` SET `bank_money` = `bank_money` + ? WHERE `pystories_users`.`id` = ?"valuesid)
    if 
not value2 then
        local rnd
={math.random(1,10),math.random(1,3)}
        
local rep=getElementData(source,"player:reputation") or 0
        local xd
=rep+rnd[2]
        
setElementData(source,"player:reputation",xd)
        if 
rnd[1] == or rnd[1] == or rnd[1] == 9 then
            triggerClientEvent
(source"reputation:show"resourceRootrnd)
        
end
    end
end
)

Zero b??d?w, w 'zabieraniu' kasy z banku bez problemu dzia?o, po zmianie na dodawanie kasy do banku - nie dodaje.
6. KASA - PSRPG
Witam posiadam problem z pracami poniewa? gdy wje?d?am w punkty np. autobusem , streetview, magazynier to nie dostaje kasy :?
7. Czemu kasa nie dodaje sie w hudzie?
Witam, mam pewien problem, a mianowicie ucze sie na paczce pysa, przerabiam go na moj serwer. Lecz, gdy jade na streetview, to pisze ze otrzymuje X kasy, a w hudzie nie pokazuje sie, ze ja otrzymalem. Druga sprawa - gdy chce uzyc na sobie komendy /daj.kase, to pisze, ze musze byc zalogowany, lecz ja jestem zalogowany. Uzywam panelu logowania ze skygame (tak, podpialem go pod pysa)
8. kasa i MySQL
Siemka . Mam do was pytanko odno?nie bazy danych na serwerze lokalnym MTA . Mam program XAMPP all dzia?a , ale nie wiem jak pod??czy? zasoby aby wczyta?y baze danych . Kolejnym pytaniem jest dlaczego to nie daje kasy ?
Kod :
client


function unloadFurniture(hemd)
if 
he ~= localPlayer then return end
-- jakitam kod pracy...
               
local kasa math.random(300,400)
               
local kasapremium math.random(600,700)
               if 
getElementData(localPlayer,"player:premium"then
            triggerServerEvent
("givePlayerMoney"hekasapremium)
                        
outputChatBox ("* [PREMIUM] Roz?adowa?e? skrzynk? dostajesz "..kasapremium.." PLN!"61479true )
        else
            
triggerServerEvent("givePlayerMoney"hekasa)
                        
outputChatBox ("* Roz?adowa?e? skrzynk? dostajesz "..kasa.." PLN!"61479true )

Dzi?ki za odpowied?i :D
9. Kasa
Witom zrobi?em funkcje kt?ra daje kase ale troche nie umiem zrobic ze gdy dodaje nam kase to sprawdza czy mamy za duzo lub za malo kasy to dodaje/ujmuje zlotowke tutaj kod prosze o naprawe go
Pawn

GiveM
(playerid ,zla ,gra)
{
    new 
ksa[256];
    
format(ksa ,256 ,"+%izl %igr" ,zla ,gra);
    
TextDrawSetString(Zabierz[playerid] ,ksa);
    
TextDrawShowForPlayer(playerid ,Zabierz[playerid]);
    
SetTimerEx("znikk" ,5000 ,false ,"i" ,playerid);
    
zl[playerid] = zl[playerid] + zla;
    
gr[playerid] = gr[playerid] + gra;
    
    if(
gr[playerid] > 99)//to nie dziala
    
{
        
gr[playerid] = 0;
        
zl[playerid] = zl[playerid] + 1;
    }
    if(
gr[playerid] < 0)//i to
    
{
        
gr[playerid] = 100 gr[playerid];
        
zl[playerid] = zl[playerid] - 1;
    }
    return 
1;
}


Daje zimniusie :piwo;
10. [PC] Kasa / Modowanie konta
Wszystkich znudzonych farmieniem zapraszam na moje aukcje na Allegro.
http://allegro.pl/gta-v-o...6648189143.html

http://allegro.pl/listing...?us_id=25992276
11. Praca i kasa
Cze?? wszystkim !

Drodzy u?ytkownicy GTAO.PL mam taki problem i? mam prace niekt?re z YA i mam
te prace niekt?re jak napisa?em wy?ej. Bo na tym serwerze dawnym YA co by? przed ITS to daje kasae do bankomatu za 1 pkt na pracy streetview. No i jak to zrobi? zeby nie dawa?o kasy do bankomatu tylko odrazu na konto gracza za pomoc daje 5 :piwo: I R*

Praca StreetView :
Kod z strony Clienta :
[lua]
--[[
Praca busa

]]--
local code = "StreetView"
local districtsBus = {

{2467.59,-1729.61,12.90},
{2434.20,-1664.15,25.05},
{2433.48,-1459.84,23.34},
{2341.13,-1380.98,23.35},
{2099.35,-1381.12,23.35},
{2073.41,-1247.81,23.34},
{2161.84,-1224.48,23.34},
{2372.89,-1156.75,26.97},
{2667.25,-1157.26,52.83},
{2871.18,-1198.94,10.40},
{2898.06,-1505.07,10.39},
{2847.69,-1679.34,10.39},
{2821.14,-1900.94,10.46},
{2692.69,-2152.78,10.43},
{2260.25,-2222.39,12.83},
{1975.36,-2107.68,12.89},
{1964.12,-1901.65,12.90},
{2005.56,-1754.56,12.90},
{2211.57,-1734.02,12.91},
{2375.42,-1735.23,12.90},
{2495.86,-1750.82,12.99},
}
local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus

function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end

if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0

end
if getElementData(localPlayer,"player:job&qu...
12. Marker : Kasa na start gry
Cze?? ot?z napisa?em swoj pierwszy skrypt na marker kt?ry jak sie wejdzie daje na start gry 5000PLN wszystko dobrze chyba i nwm czemu sie nie chce wgrac pisze mi co? takiego :

start: Resource could not be found



Kod meta.xml ( oczywi?cie pliki s? w lua i xml)
Kod:


<meta>

<info author="NiKe."/>

<script type="server" src="protect.lua"/>

</meta>




a to kod skryptu :


local marker
=createMarker(2471.65, -38.30 26.48"cylinder",1.5,255,255,0,100)
function 
kasa(player)
givePlayerMoney(player,5000)
outputChatBox("Otrzyma?e?/a? od nas na start gry 5000PLN na start ?yczymy mi?ej gry!",player)
end
addEventHandler
("onMarkerHit",marker,kasa)


Wgrywam to do resources i nic

Za pomoc daje :piwo: i R*


Prosz? stosowa? znaczniki lua/code //Emm
13. Kasa na minusie
Mam problem gdyz ktos maluje i ma 0$ to mu zostawie pieniadze na minusie.

[lua]
createBlip (-2715, 221.75, 3.4, 63)

setGarageOpen ( 15, true )

local strefyLakiernicze = {
LakierniaDoherty = {
cuboid = {-2730.0549, 210.62022, 3.234375, 14.25, 11.5, 3},--cuboid
marker = {-2715, 221.75, 3.4}, --marker
},
}

for i,v in pairs(strefyLakiernicze) do
l_cuboid = createColCuboid(unpack(v.cuboid))
l_wybor = createMarker(v.marker[1], v.marker[2], v.marker[3], "cylinder", 1, 0, 0, 0, 100)
end

addEventHandler("onMarkerHit",l_wybor,
function ( player )
outputChatBox("> Aby zmieni? kolor pojazdu, wpisz odpowiedni? komend?.",player, 0, 120, 255, true)
outputChatBox("> Koszt malowania: 150 z?.",player, 0, 120, 255, true)
outputChatBox("> Kolory: #ffff00/zolty #ff9900/zloty #ff6600/pomaranczowy #ff0000/czerwony #ff00ff/rozowy #b803ff/fioletowy #800080/purpurowy #0000ff/niebieski #00ffff/niebieski2 #000080/granatowy #00ff00/limonkowy #00b400/zielony #006400/zielony2 #000000/czarny #ffffff/bialy",player, 0, 120, 255, true)
end
)

addCommandHandler("zolty",
function (player, cmd)
local pojazd = getElementsWithinColShape(l_cuboid, "vehicle")
if isElementWithinMarker(player,l_wybor) then
local pojazd = getElementsWithinColShape(l_cuboid, "vehicle")
if #pojazd&l...
14. Kasa na minusie i wszystkim wyświetla się GUI
Skrypt wy?wietla ka?dym GUI montowania, gdy? kto? inny wjedzie w marker. Drugi problem polega na tym, ?e gdy kto? nie ma danej kwoty to mu bierze pieni?dze i zostawia mu na minusie.
Kod strona clienta (GUI):
[lua]

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(339, 179, 499, 460, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateButton(25, 37, 115, 58, "MK-1 Przy?pieszenien (3900$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(140, 37, 113, 58, "MK-1 Pr?dko??n (4600$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(261, 38, 220, 57, "Demont", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(25, 103, 115, 51, "MK-2 Przy?pieszenien (5100$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateButton(138, 1...
15. Kasa
Witajcie, jak zrobic kase z groszami ( PLN 12.93) z wy?wietleniem?
Wiem, ?e jest potrzebne getPlayerMoney i co dalej?
16. Marker i kasa
Chodzi i to, ?e nie wiem jak zrobic zeby po WJECHANIU w marker pobiera?o kase


Bramka1 createMarker (-1742.5296630859,498.69064331055,38.445236206055,"cylinder",2,150,255,150,150)

function 
markerAlert(markerHit,matchingDimension)
    if (
matchingDimensionthen
        outputChatBox
("You have just entered a marker.",source,255,255,0)
    
end
end
addEventHandler
("onPlayerMarkerHit",getRootElement(),markerAlert)
function 
takeCash thePlayercommandamount )
     
takePlayerMoney thePlayertonumber(amount) )
addCommandHandler "takecash"takeCash )
17. Kasa
Ot?? mam problem. Posiadam taki oto skrypt kt?ry oczywi?cie nie dzia?a bo gdyby dzia?a? to bym tutaj nie pisa? :P
function hajs thePlayer )
local x,y,getElementPositionthePlayer )
kasa createPickup(x,y,z,3,12125000)
givePlayerMoneythePlayer500)
end
addEventHandler 
"onPlayerWasted"getRootElement(), hajs )

function 
hajs2 ()
destroyElement(kasa)
end
addEventHandler 
"onPickupUse"getRootElement(), hajs2 )


Jak kto? co? wie na ten temat to z ca?? pewno?ci? mi pomo?e. Nie chodzi mi o napisanie gotowca. Bardziej mi chodzi o odes?anie do wiki, najwy?ej cz??? a reszt? to abym dopisa?. DB3 wywala b??d w 2,3,4 linii czyli ca?y ten emm zbi?r funkcji.
18. Kasa co jakis czas !
Witam mam tu taki kod ale on nie dziala
function(thePlayer)
local accName getAccountName getPlayerAccount thePlayer ) ) 
     if 
isObjectInACLGroup ("user."..accNameaclGetGroup "Premium" ) ) then
     setTimer
(function()
            
outputChatBox("Dostales 200$ za czas gry.",thePlayer,0,255,0
            
givePlayerMoney(thePlayer,200)
        
end,1000,1)    
    
end
end
19. kasa
Siemka,
robi? dalej skrypt na TUNE, i mam 3 pytanka:
•jak doda? aby jak mechanik nie ma kasy na tune nie pozwoli?o mu zrobi?,
•nie by? tekst widoczny na ca?ym serwerze,
•jak kto? ma tune nie mo?e za?o?y? tylko poka?e mechanikowi si? napis " * Ten pojazd ju? ma t? cz??? zamontowan? "
Dam jeszcze kod:

 
function addwheels sourcePlayercommand )
    
theVehicle getPlayerOccupiedVehicle sourcePlayer )
    if ( 
theVehicle then 
        addVehicleUpgrade 
theVehicle1002 
        
takePlayerMoney(sourcePlayer,8550)
        
outputChatBox "Zamontowano spoiler w poje?dzie."source255255255true )
    
end
end
addCommandHandler 
"dodaj.drag"addwheels )
 
function 
remwheels sourcePlayercommand )
    
theVehicle getPlayerOccupiedVehicle sourcePlayer )
    if ( 
theVehicle then
        removeVehicleUpgrade 
theVehicle1002 )
        
givePlayerMoney(sourcePlayer,8550)
        
outputChatBox "Zdemontowano spoiler w poje?dzie."source255255255true )
    
end
end
addCommandHandler 
"usun.drag "remwheels )

Stawiam :arrow: :piwo:
20. Kasa za granie dla ACL i Czasowy ACL
Siemka, mam problem z kodem. Chc? aby by? tylko dla ACL Premium. Dam jeszcze kod :
addEventHandler("onPlayerJoin"root, function()
 
setElementData(source"lastTime"getRealTime().timestampfalse) -- zapisujemy aktualny timestamp (w sekundach)
 
end)

local function naliczaniePremii()
 
local ts=getRealTime().timestamp -- aktualny timestamp
 
for i,v in ipairs(getElementsByType("player")) do
  
local lt=getElementData(v,"lastTime")
  if 
lt and lt+3600<ts then  -- min??a godzina od wej?cia na serwer
   givePlayerMoney
(v350)
   
outputChatBox("[PREMIUM]Dostajesz 350 Euro za sp?dzenie godziny na serwerze."v)
   
setElementData(v"lastTime"getRealTime().timestampfalse)
  
end
 end
end

setTimer
(naliczaniePremii10) -- sprawdzamy czasy co minut?


I mam 2 pytanko, czyli Czasowe ACL. Chodzi mi o to, ?e w grze wpisuje /dodaj.acl Premium sebik2303 5d to by? przyk?ad.
Jak by kto? m?g? odpowiedzie? ;) Stawiam :arrow: :piwo: wraz z :arrow: R* ;)
Dzi?kuj? za pomoc ::
21. [DM] Kasa i EXP za czas na Serwerze i Pracy
Witam

Chcia?bym Ulepszy? Skrypt poprzez Dodanie pieni?dzy i Exp za czas sp?dzony w na Serwerze naprzyk?ad lub Wynagrodzenie Pieni??ne za GOdzine w Pracy naprzyk??d 100$. Mo?e kto? pom?c mi w tym ?
22. Kasa co 5 min
Witam, poszukuj? skryptu kt?ry daje co 5 min ka?demu graczowi 5000$. Z g?ry, dzi?ki
23. Kasa Do Wybrania
Witajcie!. Chcia?bym zrobi? aby po wej?ciu w marker, dosta?bym taki jakby "kwitek" ze mog? go gdzie? odebra? lecz chcia?bym zrobi? aby np. dostawa?o si? hmmm 50 $ dopiero po odebraniu w danym miejscu. Prosz? o szybk? pomoc :)
Stawiam du?o :piwo: