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

Wysłany: 2014-03-24, 17:27


zuraw13







Wiek: 27
Na forum: 5073 dni
Posty: 95
Nick w MP: zuraw113

Piwa: 191

Respekt: 50

Gdy mam wymagan? ile?? exp levele si? nie zmieniaj?.
Kod:
local lvl =
    {
        50, -- 1
        500, -- 2
        1000, -- 3
        2000, -- 4
        3000, -- 5
        4500, -- 6
        6000, -- 7
        8000, -- 8
        9500, -- 9
        11000, -- 10
        13000, -- 11
        15000, -- 12
        17000, -- 13
        18000, -- 14
        20000, -- 15
        22500, -- 16
        25000, -- 17
        27500, -- 18
        30000, -- 19
        35000, -- 20
        50000, -- 21
        60000, -- 22
        70000, -- 23
        80000, -- 24
        100000 -- 25
}
    
addEvent "onZombieWasted"true )
addEventHandler "onZombieWasted"root,
    function ( killer )
        addPlayerZombieKills killer )
    end
)

function addPlayerZombieKills killer )
    local account getPlayerAccount killer )
    if isGuestAccount account then
        return
    end

    local H tonumber getElementData killer"Exp" ) ) or 0
    local L tonumber getElementData killer"Level" ) ) or 0
    setElementData killer"Exp"tonumber ) + )
    local H = ( )
    local L = ( )
    if ( <= #lvl ) and ( lvl [ L ] ) and ( tonumber ( H ) >= tonumber ( lvl [ L ] ) ) then
        setElementData killer"Level")
        triggerClientEvent(killer"CreateBox"getRootElement(), "info""Osi?gn??e? nast?pny level! Gratulacje!")
    end
end


function addPlayerKills totalAmmokillerkillerWeaponbodypart )
    if isElement(killer) and getElementType(killer) == "player" and not killer == source then
    setElementData killer"Exp"tonumber getElementData(killer"Exp") ) + )
    setElementData(killer"Zabicia"tonumber(getElementData(killer"Zabicia") ) + )
    outputChatBox("Zabi?e? gracza "..getPlayerName(source)..", dostajesz 3 pkt respektu."killer)
    outputChatBox("Zabi? Ci? "..getPlayerName(killer).."."source)
    local H tonumber getElementData killer"Exp" ) ) or 0
    local L tonumber getElementData killer"Level" ) ) or 0
    local H = ( )
    local L = ( )
    if ( <= #lvl ) and ( lvl [ L ] ) and ( tonumber ( H ) >= tonumber ( lvl [ L ] ) ) then
        setElementData killer"Level")
        triggerClientEvent(killer"CreateBox"getRootElement(), "info""Osi?gn??e? nast?pny level! Gratulacje!")
    end
    end
    setElementData(source"?mierci"tonumber(getElementData(source"?mierci") ) + 1)
end
addEventHandler("onPlayerWasted"rootaddPlayerKills)

function onLogin _account )
    setElementData source"Level"getAccountData account"lvl" ) or "1" )
    setElementData source"Exp"getAccountData account"Exp" ) or "0" )
    setElementData source"Zabicia"getAccountData account"Zabicia" ) or "0" )
    setElementData source"?mierci"getAccountData account"?mierci" ) or "0" )
    setElementData source"Kasa"getAccountData account"Kasa" ) or )
    setPlayerMoneysourcegetElementData(source"Kasa") or 0)
end
addEventHandler "onPlayerLogin"rootonLogin )

function saveData (  )
        local theAccount getPlayerAccount(source)
            if not isGuestAccount(theAccountthen
            setAccountData theAccount"lvl"getElementData source"Level" ) )
            setAccountData theAccount"Exp"getElementData source"Exp" ) )
            setAccountData theAccount"Zabicia"getElementData source"Zabicia" ) )
            setAccountData theAccount"?mierci"getElementData source"?mierci" ) )
            setAccountData theAccount"Kasa"getPlayerMoney(source) )

        
    end
end
addEventHandler("onPlayerQuit"rootsaveData)




Przywo?uje: http://gtao.pl/teleport-w-gui-vt83378,15.htm

Podpis
Moje skrypty i mapy:
-Baza by Zuraw [SAMP]
-RC Vehicles enter by Zuraw [SAMP]
-Neony by zuraw [SAMP]
Ostatnio zmieniony przez zuraw13 2014-03-25, 20:51, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-25, 17:52


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4782 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1798

Respekt: 117,3
Respekt: 117,3

Jakie? b??dy w debugu??

Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-25, 20:34


zuraw13







Wiek: 27
Na forum: 5073 dni
Posty: 95
Nick w MP: zuraw113

Piwa: 191

Respekt: 50

Nic, czysto

[ Dodano: 2014-05-12, 15:04 ]
[quote="zuraw13"]Gdy mam wymagan? ile?? exp levele si? nie zmieniaj?.
Kod:
local lvl =
    {
        50, -- 1
        500, -- 2
        1000, -- 3
        2000, -- 4
        3000, -- 5
        4500, -- 6
        6000, -- 7
        8000, -- 8
        9500, -- 9
        11000, -- 10
        13000, -- 11
        15000, -- 12
        17000, -- 13
        18000, -- 14
        20000, -- 15
        22500, -- 16
        25000, -- 17
        27500, -- 18
        30000, -- 19
        35000, -- 20
        50000, -- 21
        60000, -- 22
        70000, -- 23
        80000, -- 24
        100000 -- 25
}
    
addEvent "onZombieWasted"true )
addEventHandler "onZombieWasted"root,
    function ( killer )
        addPlayerZombieKills killer )
    end
)

function addPlayerZombieKills killer )
    local account getPlayerAccount killer )
    if isGuestAccount account then
        return
    end

    local H tonumber getElementData killer"Exp" ) ) or 0
    local L tonumber getElementData killer"Level" ) ) or 0
    setElementData killer"Exp"tonumber ) + )
    local H = ( )
    local L = ( )
    if ( <= #lvl ) and ( lvl [ L ] ) and ( tonumber ( H ) >= tonumber ( lvl [ L ] ) ) then
        setElementData killer"Level")
        triggerClientEvent(killer"CreateBox"getRootElement(), "info""Osi?gn??e? nast?pny level! Gratulacje!")
    end
end


function addPlayerKills totalAmmokillerkillerWeaponbodypart )
    if isElement(killer) and getElementType(killer) == "player" and not killer == source then
    setElementData killer"Exp"tonumber getElementData(killer"Exp") ) + )
    setElementData(killer"Zabicia"tonumber(getElementData(killer"Zabicia") ) + )
    outputChatBox("Zabi?e? gracza "..getPlayerName(source)..", dostajesz 3 pkt respektu."killer)
    outputChatBox("Zabi? Ci? "..getPlayerName(killer).."."source)
    local H tonumber getElementData killer"Exp" ) ) or 0
    local L tonumber getElementData killer"Level" ) ) or 0
    local H = ( )
    local L = ( )
    if ( <= #lvl ) and ( lvl [ L ] ) and ( tonumber ( H ) >= tonumber ( lvl [ L ] ) ) then
        setElementData killer"Level")
        triggerClientEvent(killer"CreateBox"getRootElement(), "info""Osi?gn??e? nast?pny level! Gratulacje!")
    end
    end
    setElementData(source"?mierci"tonumber(getElementData(source"?mierci") ) + 1)
end
addEventHandler("onPlayerWasted"rootaddPlayerKills)

function onLogin _account )
    setElementData source"Level"getAccountData account"lvl" ) or "1" )
    setElementData source"Exp"getAccountData account"Exp" ) or "0" )
    setElementData source"Zabicia"getAccountData account"Zabicia" ) or "0" )
    setElementData source"?mierci"getAccountData account"?mierci" ) or "0" )
    setElementData source"Kasa"getAccountData account"Kasa" ) or )
    setPlayerMoneysourcegetElementData(source"Kasa") or 0)
end
addEventHandler "onPlayerLogin"rootonLogin )

function saveData (  )
        local theAccount getPlayerAccount(source)
            if not isGuestAccount(theAccountthen
            setAccountData theAccount"lvl"getElementData source"Level" ) )
            setAccountData theAccount"Exp"getElementData source"Exp" ) )
            setAccountData theAccount"Zabicia"getElementData source"Zabicia" ) )
            setAccountData theAccount"?mierci"getElementData source"?mierci" ) )
            setAccountData theAccount"Kasa"getPlayerMoney(source) )

        
    end
end
addEventHandler("onPlayerQuit"rootsaveData)


Podpis
Moje skrypty i mapy:
-Baza by Zuraw [SAMP]
-RC Vehicles enter by Zuraw [SAMP]
-Neony by zuraw [SAMP]
Postaw piwo autorowi tego posta
 

 
Tagi: nie :: zmieniają :: się :: levele!!!
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