Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-06-25, 19:03


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

witam mam tu owy skrypt dla graczy premium nie daje pieni?dzy nie wiem w czym jest b??d.
setTimer(function()
if not getElementData(localPlayer,"player:premium"then return end
triggerServerEvent("givePlayerMoney"localPlayer15000)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!",2552150)
end,60000*10,0)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 19:07


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

ja te? nie wiem, db3? a mo?e grasz nie ma podanej elementDaty? a mo?e event nie jest dodany po stronie servera? Sprawd? to

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 19:37


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

[2017-06-25 19:33:49WARNING: [GM]/[podstawa]/[ogrpg]/ogrpg-core/base.lua:214Bad argument 'getElementData' [Expected element at argument 1got nil]
ta linijka
if not getElementData(localPlayer,"player:premium"then return end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 20:23


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

localPlayer nie istnieje, pewnie jest ?le u?o?ona komenda. Daj j? ca??

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 21:42


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

"amited" napisał/a:

localPlayer nie istnieje, pewnie jest ?le u?o?ona komenda. Daj j? ca??
if getElementData(source,"player:premium"then 
        local queryA=string.format("SELECT * FROM og_premium WHERE uid='?' AND date > NOW() LIMIT 1"getElementData(player"player:uid"))
        local resultA=exports["goyd-db"]:pobierzWyniki(queryA)
    if (resultAthen
        --    outputChatBox("* Konto premium wa?ne do " ..resultA["premiumdate"], source)
        end
    end
    triggerClientEvent(source,"core:blipyaut",root,source)
end)

setTimer(function()
if not getElementData(localPlayer,"player:premium"then return end
triggerServerEvent("givePlayerMoney"localPlayer15000)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!",2552150)
end,60000*10,0)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 22:08


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Wnioskuj?c po kodzie poprzedzaj?cym timer plik jest umieszczony po stronie servera,
wi?c
setTimer(
    function()
        for _player in ipairs(getElementsByType("player")) do
            if getElementData(player,"player:premium"then
                triggerEvent("givePlayerMoney"player15000)
                outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!"player2552150)
            end
        end
    end,
60000*10,0)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 23:28


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

"Jacob" napisał/a:

Wnioskuj?c po kodzie poprzedzaj?cym timer plik jest umieszczony po stronie servera,
wi?c
setTimer(
    function()
        for _player in ipairs(getElementsByType("player")) do
            if getElementData(player,"player:premium"then
                triggerEvent("givePlayerMoney"player15000)
                outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!"player2552150)
            end
        end
    end,
60000*10,0)
nie pomog?o

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-26, 07:13


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Jakie? b??dy w DB3?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-26, 07:18


Makay

Tryb .lua






Wiek: 26
Na forum: 3287 dni
Posty: 38
Nick w MP: Makay

Piwa: 774

Respekt: 40,5

Ostrzeżeń: 100%
No chyba co? tutaj nie pasuje tutaj masz kod jak zadzia?a licze na :piwo: :)
setTimer(function()
    local players=getElementsByType('player')
    for _p in pairs(players) do
            if getElementData(p"player:online") and tonumber(getElementData(p"player:online")) > 60 then
                if getElementData(p"player:online") == 60 then
                    local hour getElementData(localPlayer,"player:hours") or 0
                    setElementData(localPlayer,"player:hours",hour+1)
                end    
                setElementData(p"player:online"0)
                if getElementData(p"player:premium"then
                triggerEvent("givePlayerMoney"p1500false)
                outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!"player2552150)
            end
        end
     end
end600000)


Podpis
Początkowy Programista LUA

[lua]if getElementData(source, "gracz:Makay") then
setPlayerName(source, "Makauś")
else
setPlayerName(source, ".lua")
end[/lua]
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
mis14
Wysłany: 2017-06-26, 10:13


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

"Makay" napisał/a:

No chyba co? tutaj nie pasuje tutaj masz kod jak zadzia?a licze na :piwo: :)
setTimer(function()
    local players=getElementsByType('player')
    for _p in pairs(players) do
            if getElementData(p"player:") and tonumber(getElementData(p"player:")) > 60 then
                if getElementData(p"player:") == 60 then
                    local hour getElementData(localPlayer,"player:hours") or 0
                    setElementData(localPlayer,"player:hours",hour+1)
                end    
                setElementData(p"player:"0)
                if getElementData(p"player:premium"then
                triggerEvent("givePlayerMoney"p1500false)
                outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!"player2552150)
            end
        end
     end
end600000)
niestety ?adna z tych funkcji nie daje

[ Dodano: 2017-06-26, 10:14 ]
"Jacob" napisał/a:

Jakie? b??dy w DB3?
?adne

[ Dodano: 2017-06-26, 11:00 ]
setTimer(function()
    local players=getElementsByType('player')
    for _p in pairs(players) do
            if getElementData(p"player:online") and tonumber(getElementData(p"player:online")) > 1 then
                if getElementData(p"player:online") == 1 then
                    local hour getElementData(localPlayer,"player:hours") or 0
                    setElementData(localPlayer,"player:hours",hour+1)
                end    
                setElementData(p"player:online"0)
                if getElementData(p"player:premium"then
  givePlayerMoney(p250false)
                outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut! "player2552150)
            end
        end
     end
end600000)
dodam ?e pieni?dze daje dla premium ale pokazuje ka?demu outputChatBox a chodzi aby pisa?o tylko dla premium

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-26, 11:18


Makay

Tryb .lua






Wiek: 26
Na forum: 3287 dni
Posty: 38
Nick w MP: Makay

Piwa: 774

Respekt: 40,5

Ostrzeżeń: 100%
Jak source nie zadzia?a to daj el lub prl.
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut! "source2552150)


Podpis
Początkowy Programista LUA

[lua]if getElementData(source, "gracz:Makay") then
setPlayerName(source, "Makauś")
else
setPlayerName(source, ".lua")
end[/lua]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-26, 11:21


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

da?em sobie rad? dzi?kuje.

Postaw piwo autorowi tego posta
 

 
Tagi: giveplayermoney :: premium
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » givePlayerMoney premium Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku