function bindRankInfo(player)
local accountPlayer = getPlayerAccount(player)
local rank = getAccountData(accountPlayer, "Rank")
if (rank) then
else
rank = "Novice"
setAccountData(accountPlayer, "Rank", "Novice")
end
local deliveries = getAccountData(accountPlayer, "deliveries")
if (deliveries) then
else
deliveries = 0
setAccountData(accountPlayer, "deliveries", 0)
end
local team = getPlayerTeam(player)
local teamName = getTeamName(team)
if ( teamName == "Freight") then
triggerClientEvent(player, "rankShow", player, deliveries, rank)
end
end
function binding()
bindKey(source,"F5", "up", bindRankInfo)
end
addEventHandler("onPlayerJoin", getRootElement(), binding)
Client:
function jobRankInfo(arg1, arg2)
guiSetVisible(GUIEditor.window[2], not guiGetVisible(GUIEditor.window[2]))
guiSetText(GUIEditor.label[1], "Your Current Deliveries are :-"..arg1.." You Rank:-"..arg2)
guiSetInputEnabled(not guiGetInputEnabled)
showCursor ( not isCursorShowing ())
end
addEvent("rankShow", true)
addEventHandler("rankShow", getRootElement(), jobRankInfo)