Jump to content

[HELP] Custom titles


JamesCIT

Recommended Posts

Hello i've made custom titles for accounts and groups etc and i've set it on /customT but when i do it IG the panel doesn't show up

here is the lua

local x, y = guiGetScreenSize() 
customTitles = guiCreateWindow(x / 2 - 146.5, y / 2 - 237.5, 293, 475, "CSP Custom Titles", false)
guiWindowSetSizable(customTitles, false)
grid_titles = guiCreateGridList(9, 22, 135, 373, false, customTitles)
titcol = guiGridListAddColumn(grid_titles, "Title", 0.9)
but_set = guiCreateButton(9, 395, 135, 51, "Set Title", false, customTitles)
guiSetProperty(but_set, "NormalTextColour", "FFAAAAAA")
but_remove = guiCreateButton(151, 395, 133, 51, "Remove Title", false, customTitles)
guiSetProperty(but_remove, "NormalTextColour", "FFAAAAAA")
but_close = guiCreateButton(9, 446, 275, 20, "Close", false, customTitles)
guiSetProperty(but_close, "NormalTextColour", "FFAAAAAA")
lab_info = guiCreateLabel(151, 22, 135, 363, [[
 
 
 
 
 
 
 
 
 
 
To disable the custom
 titles, go to /settings
 
 
 
 
To change the title
color, use
/titlecolor R G B]], false, customTitles)
guiSetFont(lab_info, "default-bold-small")
guiLabelSetHorizontalAlign(lab_info, "center", false)
guiSetVisible(customTitles, false)
titlesTable = {
  ["The Boss"] = true,
  ["Pickpocket"] = true,
  ["Spy"] = true,
  ["Assassin"] = true,
  ["Hitman"] = true,
  ["OverLord"] = true,
  ["Gangsta"] = true,
  ["Pimp"] = true,
  ["Inspector"] = true,
  ["Instructor"] = true,
  ["Haxor"] = true,
  ["Zombie"] = true,
  ["Troll"] = true,
  ["Sniper"] = true,
  ["Stalker"] = true,
  ["Newbie"] = true
}
local title = false
local staffs = {
  ["Trial Staff"] = true,
  ["New Staff"] = true,
  ["Trained Staff"] = true,
  ["Trusted Staff"] = true,
  ["High Staff"] = true,
  ["Head Staff"] = true
}
function showTitles()
  guiGridListClear(grid_titles)
  if exports.CSFsettings:getSetting("ctitles") == "Yes" then
    exports.CSFtexts:output("Enable the titles in settings first", 255, 0, 0)
    return
  end
  triggerServerEvent("CSFCustomTitles.getData", root)
  triggerServerEvent("CSFcustomTitles.checkAccess", root)
  guiGridListClear(grid_titles)
  unlockTitles()
  groupTitles()
  populateGrid()
  guiSetVisible(customTitles, true)
  showCursor(true)
end
addCommandHandler("customT", showTitles)
function populateGrid()
  for k, v in pairs(titlesTable) do
    r = guiGridListAddRow(grid_titles)
    guiGridListSetItemText(grid_titles, r, titcol, tostring(k), false, false)
  end
end
function unlockTitles()
  local playtime = getElementData(localPlayer, "CSPmisc.playTime") or "N/A"
  local playtime = string.gsub(playtime, "[a-z, A-Z]", "")
  local playtime = tonumber(playtime)
  local occupation = getElementData(localPlayer, "Occupation")
  local donatorL = getElementData(localPlayer, "d")
  if playtime >= 100 then
    titlesTable["Regular Player"] = true
  end
  if playtime >= 500 then
    titlesTable["Senior Player"] = true
  end
  if playtime >= 1000 then
    titlesTable.Veteran = true
  end
  if occupation == "Police Chief" then
    titlesTable["Police Chief"] = true
  end
  if staffs[occupation] then
    titlesTable.Staff = true
  end
  if donatorL ~= false and donatorL >= 1 then
    titlesTable.Donator = true
  end
end
 
function unlockBoss ( bool )
if bool then
titlesTable["Criminal Boss"] = true
end
end
addEvent("CSFCustomTitles.unlockBoss", true)
addEventHandler("CSFCustomTitles.unlockBoss", root, unlockBoss)
function unlockTitles2(turfst, turfsp, arrests, sRaces, deliveries, killedCrims, races, weed, bails, robbedHouses, bodySold, hookerUse, hijack, bc)
  if tonumber(turfst) >= 500 then
    titlesTable.Conqueror = true
  end
  if tonumber(turfsp) >= 500 then
    titlesTable.Guardian = true
  end
  if tonumber(arrests) >= 500 then
    titlesTable["Arrests Addict"] = true
  end
  if tonumber(arrests) >= 1000 then
    titlesTable["Too addicted to arresting..."] = true
  end
  if tonumber(sRaces) >= 100 then
    titlesTable["Fast & Furious"] = true
  end
  if tonumber(deliveries) >= 2000 then
    titlesTable["You can't beat me delivering"] = true
  end
  if tonumber(killedCrims) >= 400 then
    titlesTable["Anti Robbery Unit"] = true
  end
  if tonumber(races) >= 100 then
    titlesTable["Speed Racer"] = true
  end
  if tonumber(weed) >= 5000 then
    titlesTable["Drug Lord"] = true
  end
  if tonumber(bails) >= 100000 then
    titlesTable["Golden Farmer"] = true
  end
  if tonumber(robbedHouses) >= 1000 then
    titlesTable["Lock your door..."] = true
  end
  if tonumber(bodySold) >= 1000 then
    titlesTable["My body is yours"] = true
  end
  if tonumber(hookerUse) >= 300 then
    titlesTable["Sex Addict"] = true
  end
  if tonumber(hijack) >= 500 then
    titlesTable["Grand Theft Auto"] = true
  end
  if tonumber(bc) >= 500 then
    titlesTable["I'm on the case!"] = true
  end
end
addEvent("CSFCustomTitles.unlockTitles", true)
addEventHandler("CSFCustomTitles.unlockTitles", root, unlockTitles2)
function groupTitles()
  local group = getElementData(localPlayer, "g")
  if group == "DeltaForce" then
    titlesTable["DeltaForce Unit"] = true
  end
  if group == "PaNiC" then
    titlesTable.PaNiC = true
  end
    if group == "Alpha_Gam3rz" then
    titlesTable["★Alpha GaMers★"] = true
  end
  if group == "GuardGhosTs" then
    titlesTable["★GuardGhosTs★"] = true
  end
  if group == "SpecialForces" then
    titlesTable["SpecialForces Unit"] = true
  end
  if group == "InsidiousGaming" then
    titlesTable.Insidious = true
  end
  if group == "TaskForces" then
    titlesTable["TaskForce Unit"] = true
  end
  if group == "SWATTeam" then
    titlesTable["SWAT Unit"] = true
  end
  if group == "xCode" then
  titlesTable["★ xCode ★"] = true
  end
  if group == "nR7Gaming" then
    titlesTable[" nR7Gaming "] = true
  end
  if group == "Dragon" then
    titlesTable["Dragon Fighter"] = true
  end
  if group == "FBI" then
    titlesTable["Federal Agent"] = true
  end
end
 
function closeTitles()
  guiSetVisible(customTitles, false)
  showCursor(false)
end
addEventHandler("onClientGUIClick", but_close, closeTitles, false)
function specialTitles(accountName)
  guiGridListClear(grid_titles)
  unlockTitles()
  groupTitles()
  triggerServerEvent("CSFCustomTitles.getData", root)
  if accountName == "ghoussam94" then
  titlesTable["★TamTam Founder CSF Owner★"] = true
  elseif accountName == "DevMeDoo" then
    titlesTable["Official L6"] = true
  elseif accountName == "Pro^_^" then
    titlesTable["*Mayhem-FTW*"] = true
  elseif accountName == "Hassan2003" then
    titlesTable["ZeroGG*FTW"] = true
  elseif accountName == "xlMrDarwin" then
    titlesTable["★ iRyu-FTW ★"] = true
  elseif accountName == "MACK23" then
  titlesTable["I'm BoSs Ass Bitch"] = true
  elseif accountName == "nabil58" then
    titlesTable["★ police ★"] = true
  elseif accountName == "chronos" then
    titlesTable["Head police Chief"] = true
  elseif accountName == "xTyuzi" then
    titlesTable[">'-iTaChi.-'<"] = true
  elseif accountName == "Random123" then
    titlesTable.GirlPowar = true
  elseif accountName == "salvador" then
    titlesTable["*RaSTaB0Y'94*FTW NeVeR DiE"] = true
  elseif accountName == "cand1990" then
    titlesTable["Mazilla*97"] = true
  elseif accountName == "FtwFun" then
    titlesTable.Lord = true
  elseif accountName == "MartinLeonardo92" then
    titlesTable["Sexy Staff"] = true
  elseif accountName == "Evan_Unknown" then
    titlesTable["|TSF|ProudMember"] = true
  elseif accountName == "asd980915" then
    titlesTable["Technology Is Power"] = true
  elseif accountName == "PedoBear" then
    titlesTable["Free Candy"] = true
  elseif accountName == "Mikkel" then
    titlesTable["Asian Lover"] = true
 
Link to comment
weird, make sure of everthing (The meta file, the resource name, stuff like that)
i just have 2 files lua and meta here is the meta

<meta> 
    <script src="titles.lua" type="client"/> 
     
  
    <min_mta_version server="1.3.1-9.04710" client="1.3.1-9.04710"/> 
     
</meta> 
  

Link to comment
I Know this resource .. & it's not your's (only client)

lol, now i no one able to help you because you have proved to us that you are not the owner of the script .

Leacked resource.

my Friend gave it to me so ? its his and he doesn't need
Link to comment
I Know this resource .. & it's not your's (only client)

lol, now i no one able to help you because you have proved to us that you are not the owner of the script .

Leacked resource.

my Friend gave it to me so ? its his and he doesn't need

sorry we cant help leaked resources .

Link to comment
I Know this resource .. & it's not your's (only client)

lol, now i no one able to help you because you have proved to us that you are not the owner of the script .

Leacked resource.

my Friend gave it to me so ? its his and he doesn't need

sorry we cant help leaked resources .

cmon dude i edited it bymyself and it took me some hours
Link to comment
  • 1 month later...
Hello i've made custom titles for accounts and groups etc and i've set it on /customT but when i do it IG the panel doesn't show up

here is the lua

local x, y = guiGetScreenSize() 
customTitles = guiCreateWindow(x / 2 - 146.5, y / 2 - 237.5, 293, 475, "CSP Custom Titles", false)
guiWindowSetSizable(customTitles, false)
grid_titles = guiCreateGridList(9, 22, 135, 373, false, customTitles)
titcol = guiGridListAddColumn(grid_titles, "Title", 0.9)
but_set = guiCreateButton(9, 395, 135, 51, "Set Title", false, customTitles)
guiSetProperty(but_set, "NormalTextColour", "FFAAAAAA")
but_remove = guiCreateButton(151, 395, 133, 51, "Remove Title", false, customTitles)
guiSetProperty(but_remove, "NormalTextColour", "FFAAAAAA")
but_close = guiCreateButton(9, 446, 275, 20, "Close", false, customTitles)
guiSetProperty(but_close, "NormalTextColour", "FFAAAAAA")
lab_info = guiCreateLabel(151, 22, 135, 363, [[
 
 
 
 
 
 
 
 
 
 
To disable the custom
 titles, go to /settings
 
 
 
 
To change the title
color, use
/titlecolor R G B]], false, customTitles)
guiSetFont(lab_info, "default-bold-small")
guiLabelSetHorizontalAlign(lab_info, "center", false)
guiSetVisible(customTitles, false)
titlesTable = {
  ["The Boss"] = true,
  ["Pickpocket"] = true,
  ["Spy"] = true,
  ["Assassin"] = true,
  ["Hitman"] = true,
  ["OverLord"] = true,
  ["Gangsta"] = true,
  ["Pimp"] = true,
  ["Inspector"] = true,
  ["Instructor"] = true,
  ["Haxor"] = true,
  ["Zombie"] = true,
  ["Troll"] = true,
  ["Sniper"] = true,
  ["Stalker"] = true,
  ["Newbie"] = true
}
local title = false
local staffs = {
  ["Trial Staff"] = true,
  ["New Staff"] = true,
  ["Trained Staff"] = true,
  ["Trusted Staff"] = true,
  ["High Staff"] = true,
  ["Head Staff"] = true
}
function showTitles()
  guiGridListClear(grid_titles)
  if exports.CSFsettings:getSetting("ctitles") == "Yes" then
    exports.CSFtexts:output("Enable the titles in settings first", 255, 0, 0)
    return
  end
  triggerServerEvent("CSFCustomTitles.getData", root)
  triggerServerEvent("CSFcustomTitles.checkAccess", root)
  guiGridListClear(grid_titles)
  unlockTitles()
  groupTitles()
  populateGrid()
  guiSetVisible(customTitles, true)
  showCursor(true)
end
addCommandHandler("customT", showTitles)
function populateGrid()
  for k, v in pairs(titlesTable) do
    r = guiGridListAddRow(grid_titles)
    guiGridListSetItemText(grid_titles, r, titcol, tostring(k), false, false)
  end
end
function unlockTitles()
  local playtime = getElementData(localPlayer, "CSPmisc.playTime") or "N/A"
  local playtime = string.gsub(playtime, "[a-z, A-Z]", "")
  local playtime = tonumber(playtime)
  local occupation = getElementData(localPlayer, "Occupation")
  local donatorL = getElementData(localPlayer, "d")
  if playtime >= 100 then
    titlesTable["Regular Player"] = true
  end
  if playtime >= 500 then
    titlesTable["Senior Player"] = true
  end
  if playtime >= 1000 then
    titlesTable.Veteran = true
  end
  if occupation == "Police Chief" then
    titlesTable["Police Chief"] = true
  end
  if staffs[occupation] then
    titlesTable.Staff = true
  end
  if donatorL ~= false and donatorL >= 1 then
    titlesTable.Donator = true
  end
end
 
function unlockBoss ( bool )
if bool then
titlesTable["Criminal Boss"] = true
end
end
addEvent("CSFCustomTitles.unlockBoss", true)
addEventHandler("CSFCustomTitles.unlockBoss", root, unlockBoss)
function unlockTitles2(turfst, turfsp, arrests, sRaces, deliveries, killedCrims, races, weed, bails, robbedHouses, bodySold, hookerUse, hijack, bc)
  if tonumber(turfst) >= 500 then
    titlesTable.Conqueror = true
  end
  if tonumber(turfsp) >= 500 then
    titlesTable.Guardian = true
  end
  if tonumber(arrests) >= 500 then
    titlesTable["Arrests Addict"] = true
  end
  if tonumber(arrests) >= 1000 then
    titlesTable["Too addicted to arresting..."] = true
  end
  if tonumber(sRaces) >= 100 then
    titlesTable["Fast & Furious"] = true
  end
  if tonumber(deliveries) >= 2000 then
    titlesTable["You can't beat me delivering"] = true
  end
  if tonumber(killedCrims) >= 400 then
    titlesTable["Anti Robbery Unit"] = true
  end
  if tonumber(races) >= 100 then
    titlesTable["Speed Racer"] = true
  end
  if tonumber(weed) >= 5000 then
    titlesTable["Drug Lord"] = true
  end
  if tonumber(bails) >= 100000 then
    titlesTable["Golden Farmer"] = true
  end
  if tonumber(robbedHouses) >= 1000 then
    titlesTable["Lock your door..."] = true
  end
  if tonumber(bodySold) >= 1000 then
    titlesTable["My body is yours"] = true
  end
  if tonumber(hookerUse) >= 300 then
    titlesTable["Sex Addict"] = true
  end
  if tonumber(hijack) >= 500 then
    titlesTable["Grand Theft Auto"] = true
  end
  if tonumber(bc) >= 500 then
    titlesTable["I'm on the case!"] = true
  end
end
addEvent("CSFCustomTitles.unlockTitles", true)
addEventHandler("CSFCustomTitles.unlockTitles", root, unlockTitles2)
function groupTitles()
  local group = getElementData(localPlayer, "g")
  if group == "DeltaForce" then
    titlesTable["DeltaForce Unit"] = true
  end
  if group == "PaNiC" then
    titlesTable.PaNiC = true
  end
    if group == "Alpha_Gam3rz" then
    titlesTable["★Alpha GaMers★"] = true
  end
  if group == "GuardGhosTs" then
    titlesTable["★GuardGhosTs★"] = true
  end
  if group == "SpecialForces" then
    titlesTable["SpecialForces Unit"] = true
  end
  if group == "InsidiousGaming" then
    titlesTable.Insidious = true
  end
  if group == "TaskForces" then
    titlesTable["TaskForce Unit"] = true
  end
  if group == "SWATTeam" then
    titlesTable["SWAT Unit"] = true
  end
  if group == "xCode" then
  titlesTable["★ xCode ★"] = true
  end
  if group == "nR7Gaming" then
    titlesTable[" nR7Gaming "] = true
  end
  if group == "Dragon" then
    titlesTable["Dragon Fighter"] = true
  end
  if group == "FBI" then
    titlesTable["Federal Agent"] = true
  end
end
 
function closeTitles()
  guiSetVisible(customTitles, false)
  showCursor(false)
end
addEventHandler("onClientGUIClick", but_close, closeTitles, false)
function specialTitles(accountName)
  guiGridListClear(grid_titles)
  unlockTitles()
  groupTitles()
  triggerServerEvent("CSFCustomTitles.getData", root)
  if accountName == "ghoussam94" then
  titlesTable["★TamTam Founder CSF Owner★"] = true
  elseif accountName == "DevMeDoo" then
    titlesTable["Official L6"] = true
  elseif accountName == "Pro^_^" then
    titlesTable["*Mayhem-FTW*"] = true
  elseif accountName == "Hassan2003" then
    titlesTable["ZeroGG*FTW"] = true
  elseif accountName == "xlMrDarwin" then
    titlesTable["★ iRyu-FTW ★"] = true
  elseif accountName == "MACK23" then
  titlesTable["I'm BoSs Ass Bitch"] = true
  elseif accountName == "nabil58" then
    titlesTable["★ police ★"] = true
  elseif accountName == "chronos" then
    titlesTable["Head police Chief"] = true
  elseif accountName == "xTyuzi" then
    titlesTable[">'-iTaChi.-'<"] = true
  elseif accountName == "Random123" then
    titlesTable.GirlPowar = true
  elseif accountName == "salvador" then
    titlesTable["*RaSTaB0Y'94*FTW NeVeR DiE"] = true
  elseif accountName == "cand1990" then
    titlesTable["Mazilla*97"] = true
  elseif accountName == "FtwFun" then
    titlesTable.Lord = true
  elseif accountName == "MartinLeonardo92" then
    titlesTable["Sexy Staff"] = true
  elseif accountName == "Evan_Unknown" then
    titlesTable["|TSF|ProudMember"] = true
  elseif accountName == "asd980915" then
    titlesTable["Technology Is Power"] = true
  elseif accountName == "PedoBear" then
    titlesTable["Free Candy"] = true
 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...