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

Wysłany: 2013-10-20, 13:40


ekipa996







Wiek: 26
Na forum: 4623 dni
Posty: 1
Nick w MP: Brayan



Respekt: 50

m?j kod to jest
Kod:

addEventHandler('onResourceStart',getResourceRootElement(),

function()

call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Score")

for theKey,thePlayer in ipairs(getElementsByType ( "player" )) do

setElementData(thePlayer,"Score",0)

end

end)



addEventHandler('onPlayerJoin',getRootElement(),

function()

setElementData(source,"Score",0)

end)


save score nie wiem jak zrobic prosze o pomoc

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-10-20, 14:45


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

addEventHandler('onResourceStart',getResourceRootElement(), 
function() 
call(getResourceFromName("scoreboard"), "addScoreboardColumn""Score"end
addEventHandler("onPlayerLogin"root, 
function() 
     accountScore getAccountData(getPlayerAccount(source), "Punkty")
     if (accountScorethen
          setElementData(source"Score"tonumber(accountScore)) 
     else
          setElementData(source"Score"0) 
     end
end
)

addEventHandler("onPlayerQuit"root,
function ()
     local scoreData getElementData(source"Score")
     setAccountData(getPlayerAccount(source), "Score"scoreData)
end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-10-20, 14:49


Boski







Wiek: 39
Na forum: 4672 dni
Posty: 11

Piwa: 50

Respekt: 50

Dzi?kowac nie pomog? by? troche jeszcze nam ... PS: posiadasz moze skypaja.?

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-10-20, 15:40


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

function onPlayerLogin ()
        local playeraccount getPlayerAccount source )
        if ( playeraccount then
                if not isGuestAccount playeraccount then
                        local playerscore getAccountData playeraccount"points" )
                        if ( playerscore then
                                setElementData(source"Score"playerscore )
                        end
                end
        end
end

function onPlayerQuit ()
        local playeraccount getPlayerAccount source )
        if ( playeraccount then
                if not isGuestAccount playeraccount then
                        local playerscore getElementData source"Score" )
                        if ( playerscore then
                                setAccountData playeraccount"points"playerscore )
                        end
                end
        end
end

addEventHandler "onPlayerLogin"getRootElement (), onPlayerLogin )
addEventHandler "onPlayerQuit"getRootElement (), onPlayerQuit )


Z mojego gamemodu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-10-20, 18:35


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

"Boski" napisał/a:

Dzi?kowac nie pomog? by? troche jeszcze nam ... PS: posiadasz moze skypaja.?


Posiadam, ale ju? nie mam gta san andreas(nie jest mi potrzebne) i nie zamie?am pobiera? dla jakiego? serwera, kt?ry i tak nie wiadomo czy za nie d?ugo nie upadnie, wi?c za du?o wam nie pomoge ;d

Postaw piwo autorowi tego posta
 

 
Tagi: czemu :: nie :: działa :: zapis :: score
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