server
function onLogin(_,account)
local acc = getAccountData(account,"1_Time")
if acc == "1" then return end
triggerClientEvent(source,"forEveryNewPerson",source)
end
addEventHandler("onPlayerLogin",root,onLogin)
function saveData(thePlayer,theAccount)
if (theAccount and not isGuestAccount(theAccount)) then
local data = getElementData(thePlayer,"1_Time")
if data then
setAccountData(theAccount,"1_Time",tostring(data))
end
end
end
addEventHandler("onPlayerQuit",root,function()saveData(source,getPlayerAccount(source))end)
addEventHandler("onPlayerLogout",root,function(prev)saveData(source,prev)end)
client
http://pastebin.com/GT5HMuxZ -- sorry the client side is confused with the website smiles.
gs is defined as guiSetText
metals = labels
This is a project of metals script , i mean , everyone whose joins the server then give him 10 for each metal, the player can sell and buy, so if that player bought .. e.g , 5 golds , and here goes the math calculation, then provide 5 on 10 = 15 ofc , did you understand one word from wat i said lol ?.