Wysłany: 2013-10-20, 13:40
ekipa996
Wiek: 26 Na forum: 4623 dni Posty: 1
Nick w MP: Brayan
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
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
addEventHandler ( 'onResourceStart' , getResourceRootElement (),
function()
call ( getResourceFromName ( "scoreboard" ), "addScoreboardColumn" , "Score" )
end
)
addEventHandler ( "onPlayerLogin" , root ,
function()
accountScore = getAccountData ( getPlayerAccount ( source ), "Punkty" )
if ( accountScore ) then
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
)
Wysłany: 2013-10-20, 14:49
Boski
Wiek: 39 Na forum: 4672 dni Posty: 11
Piwa : 50
Dzi?kowac nie pomog? by? troche jeszcze nam ... PS: posiadasz moze skypaja.?
Wysłany: 2013-10-20, 15:40
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
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
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
"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
Tagi: czemu :: nie :: działa :: zapis :: score
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: