👤Conditions
Dont nest
local function logoutPlayer()
if playerData.loggedIn then
if playerData.player.exists() then
playerData.player.logout()
end
end
end
local function logoutPlayer()
if not playerData.loggedIn then return end
if not playerData.player.exists() then return end
playerData.player.logout()
end
Use inline if statements when possible
local function getPlayerName()
if playerData.playerLoaded then
return playerData.name
else
return 'unkown'
end
end
local function getPlayerName()
return playerData.playerLoaded and playerData.name or 'unkown'
end
Last updated