Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: kolumnie
1. Punkty w kolumnie scoreboard
Witam, posiadam taki oto skrypt na game pointsy:

[spoiler][lua]function resetPoints()
for k, v in ipairs(getElementsByType("player")) do
local acc = getPlayerAccount(v)
local pkts = getAccountData(acc, "g_points")
if type(pkts) ~= "number" or type(pkts) == "number" and pkts < 1 then
setAccountData(acc, "g_points", 0)
end
end
end
addEventHandler("onResourceStart", getRootElement(), resetPoints)

function givePoints()
local account = getPlayerAccount(client)
if isGuestAccount(account) then return end
setAccountData(account, "g_points", getAccountData(account, "g_points") + 1)
outputChatBox("Posiadasz: "..getPlayerPoints(client).." game points", client)
end
addEvent("giveGPoint", true)
addEventHandler("giveGPoint", resourceRoot, givePoints)


function getPlayerPoints(player)
local acc = getPlayerAccount(player)
if isGuestAccount(acc) then return end
pkt = getAccountData(acc, "g_points")
return pkt
end

addCommandHandler("showpkt", function(plr, cmd)
outputChatBox("Posiadasz: "..getPlayerPoints(plr).." game points", plr)
end)[/lua][/spoiler]

I chc? go podczepi? pod scoreboard, wykmini?em taki kod:

[spoiler][lua]call(getResourceFromName("scoreboard"), "scoreboardAddColumn", "Punkty", 100, "Punkty:", 3)
...