Niestety dalej tak samo
U?ywam Tej http://community.mtasa.co...=details&id=419 Tabeli. A To call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Score")
setElementData ( source, "score", 3 ) mam w innym pliku
Zrobi?em tak i nie dzia?a ;/
function komenda ( thePlayer,command,score)
if getPlayerFromName(nick) and tonumber(score) then
setElementData(thePlayer,getElementData(thePlayer,'Score')+score)
end
end
addCommandHandler('dajscore',komenda)
Niestety dalej nic ;/
M?j plik kt?ry dodaje score do panelu:
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)
a to m?j plik na dodawanie score:
function command ( thePlayer,command,score)
if getPlayerFromName(nick) and tonumber(score) then
setElementData(thePlayer,getElementData(thePlayer,'score')+score)
end
end
addCommandHandler('dajscore',command)
Dalej nic ;/ :
local root = setElementData()
function command ( thePlayer,command,score)
if getPlayerFromName(nick) and tonumber(score) then
setElementData(thePlayer,getElementData(thePlayer,'score')+score)
end
end
addCommandHandler('dajscore',command)
Usu? locala, i zr?b formu?k? if true else player. Nie pami?tam jak ona sz?a i nie mog? powiedzie? :< Je?li if true else nic nie da, to spr?buj i local i if true else.
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