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

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


sasik12







Wiek: 26
Na forum: 3763 dni
Posty: 182

Piwa: 7

Respekt: 60

Witajcie . Czemu ten kod nie daje kasy ?
To kod na kase dla premium

setTimer(function()
    local players=getElementsByType('player')
    for _p in pairs(players) do
            if getElementData(p"player:online") and tonumber(getElementData(p"player:online")) > 10 then
                if getElementData(p"player:online") == 10 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"p20000,false)
                triggerClientEvent(p,"addNotification",root,"* Premium* Dostajesz 20000 PLN za przegranie 10min","info")
            end
        end
     end
end100000)


Podpis
Uczeń LUA . Mapper MTA.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-26, 01:53


.RiV







Wiek: 25
Na forum: 3588 dni
Posty: 554
Nick w MP: Split

Piwa: 2596

Respekt: 597,8
Respekt: 597,8

Jak wygl?da ten trigger ?

triggerEvent("givePlayerMoney"p20000,false)


Podpis

Autor OGRPG, na scenie MTA od 2012 roku.




Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-26, 11:50


DylemaT929

Nikt






Wiek: 28
Na forum: 4041 dni
Posty: 333
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

trigger mo?e i jest, ale o to mu chodzi, ?e nie daje kasy. Ten event masz te? w ogrpg-prace-settings musisz to tez mie? w??czone.

A ten event tak wyglada


addEvent("givePlayerMoney"true)
addEventHandler("givePlayerMoney"root, function(value,value2)
    -- nie zalogowana osoba a fuj
    if not tonumber(valuethen return end
    if not getElementData(source,"player:logged"then return end
    givePlayerMoney(source,value)
    -- Kod od reputacji
    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)


Postaw piwo autorowi tego posta
 

 
Tagi: nie :: daje :: pln
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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