I found some code, now help with this. He wants to list the screen but does not work. "Twoje PP" does not exist on the screen. Help
This is not the whole part of the code
--Client
function getPlayerPoints (thePlayer)
if saveMethod == "accounts" then
if not isGuestAccount(getPlayerAccount(thePlayer)) then
local account = getPlayerAccount(thePlayer)
local points = getAccountData(account, "points_class")
return tonumber(points)
else
outputDebugString("pointsystem_classes - getPlayerPoints (Account is guest! Can't get points!)")
end
elseif saveMethod == "database" then
local serial = getPlayerSerial(thePlayer)
local points = executeSQLSelect ( "pointsystem_classes", "points","serial = '" .. serial .. "'")
if points then
return tonumber(points[1]["points"])
else
outputDebugString("pointsystem_classes - getPlayerPoints (Database unknow problem! Can't get points!)")
end
end
end
--Server
addEventHandler("onClientResourceStart", resourceRoot,
function()
end
)
addEventHandler("onClientRender", root,
function()
screenWidth, screenHeight = guiGetScreenSize()
local cash2 = getPlayerPoints( getLocalPlayer() )
dxDrawText("Twoje PP: #FF0000"..cash2, screenWidth * 0.7 / 2, screenHeight * 0, screenWidth * 0.5 / 2, screenHeight * 0, tocolor(2, 2, 214, 255), 1, "bankgothic", "left", "top", false, false, true, true)
--dxDrawText(""..cash, screenWidth * 0.76 / 2, screenHeight * 0.003, screenWidth * 0.5 / 2, screenHeight * 0, tocolor(255, 0, 0, 255), 0.80, "bankgothic", "left", "top", false, false, true, false, false)
end
)