Jump to content

[unsolved]need a little help[unsolved]


Recommended Posts

Posted (edited)

hi all. ok so i made a script where it show gui where there is couple of things in it. and i made it when i press f2 the gui will show but sometimes it show and sometime's it does not show so i dont know why and it does not show any error in console

this is the script

Client side

local sWidth,sHeight = guiGetScreenSize() 
local enabled = false
local menuItems = {}
local menuItemsShadow = {}
local menuButtons = {}
local jobHunt = false
local menuData = {}
local client = getLocalPlayer()
menuData["send_money"] = {}
menuData["send_message"] = {}
local blips = {}
 
function showBlips()
    exports["(tested)Jobs"]:getJobTable(client,true)
end
 
function hideBlips()
    for i,v in pairs(blips) do
        if isElement(v) then destroyElement(v) end
    end
    removeEventHandler("onClientRender",root,drawJobBlips)
end
 
addEvent("returnJobsTable",true)
addEventHandler("returnJobsTable",root,
function (jobTable)
    hideBlips()
    for i,v in pairs(jobTable) do
        if not v.int or tostring(v.int) == nil then
            blips[i] = createBlip(v.x, v.y, v.z, 41, 1, 255, 0, 0, 255, 0, 250)
            setElementData(blips[i], "name", tostring(v.role))
            setElementData(blips[i], "color", {v.r, v.g, v.b})
        end
    end
    addEventHandler("onClientRender",root,drawJobBlips)
end)
 
function renderWelcome()
    local PISTOL = (getPedStat(client, 69)/(10/2.08))
    local SILENCED = (getPedStat(client, 70)/(10/2.08))
    local DESERT = (getPedStat(client, 71)/(10/2.08))
    local SHOTGUN = (getPedStat(client, 72)/(10/2.08))
    local SAWNOFF = (getPedStat(client, 73)/(10/2.08))
    local SPAZ12 = (getPedStat(client, 74)/(10/2.08))
    local UZI = (getPedStat(client, 75)/(10/2.08))
    local MP5 = (getPedStat(client, 76)/(10/2.08))
    local AK47 = (getPedStat(client, 77)/(10/2.08))
    local M4 = (getPedStat(client, 78)/(10/2.08))
    dxDrawRectangle((0/1024)*sWidth, (0/768)*sHeight, (1100/1024)*sWidth, (770/768)*sHeight, tocolor(51,51,51,140), false)
    dxDrawText("Welcome to your User Control Panel",(280/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Welcome to your User Control Panel",(278/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Welcome to your User Control Panel",(276/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(511/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(510/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(508/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawBorderedText("Weapon skills:",(726/1024)*sWidth,(188/768)*sHeight,(924/1024)*sWidth,(211/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*1.0,"bankgothic","left","top",false,false,true)
    dxDrawBorderedText("Colt 45",(807/1024)*sWidth,(231/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(225/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(229/768)*sHeight,(PISTOL/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Colt 45 silenced",(770/1024)*sWidth,(271/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(265/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(269/768)*sHeight,(SILENCED/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Desert Eagle",(790/1024)*sWidth,(311/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)   
    dxDrawImage((740/1024)*sWidth,(305/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(309/768)*sHeight,(DESERT/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Shotgun",(807/1024)*sWidth,(352/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true) 
    dxDrawImage((740/1024)*sWidth,(345/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(349/768)*sHeight,(SHOTGUN/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Sawn Off",(807/1024)*sWidth,(392/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)   
    dxDrawImage((740/1024)*sWidth,(385/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(389/768)*sHeight,(SAWNOFF/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Spaz 12",(814/1024)*sWidth,(432/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true) 
    dxDrawImage((740/1024)*sWidth,(425/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(429/768)*sHeight,(SPAZ12/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Uzi - Tec 9",(808/1024)*sWidth,(472/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true) 
    dxDrawImage((740/1024)*sWidth,(465/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(469/768)*sHeight,(UZI/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("MP5",(840/1024)*sWidth,(512/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true) 
    dxDrawImage((740/1024)*sWidth,(505/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(509/768)*sHeight,(MP5/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("AK 47",(835/1024)*sWidth,(552/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)   
    dxDrawImage((740/1024)*sWidth,(545/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(549/768)*sHeight,(AK47/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("M4",(850/1024)*sWidth,(590/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true) 
    dxDrawImage((740/1024)*sWidth,(585/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(589/768)*sHeight,(M4/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
end
 
job_panel_window = guiCreateWindow(0.3467,0.3294,0.3037,0.2188,"tested Job Panel",true)
guiWindowSetSizable(job_panel_window,false)
guiSetVisible(job_panel_window,false)
job_panel_currentjob = guiCreateLabel(0.0386,0.2083,0.9164,0.1429,"Your current job:",true,job_panel_window)
job_panel_shift = guiCreateButton(0.045,0.7024,0.2637,0.2143,"End shift",true,job_panel_window)
job_panel_resign = guiCreateButton(0.328,0.7083,0.2572,0.2143,"Resign",true,job_panel_window)
job_panel_close = guiCreateButton(0.6077,0.7083,0.2572,0.2143,"Close",true,job_panel_window)
job_panel_hunt = guiCreateCheckBox(0.0386,0.3929,0.926,0.1131,"Job hunt: Show job blips if enabled.",false,true,job_panel_window)
guiCheckBoxSetSelected(job_panel_hunt, jobHunt)
 
resign_confirm_window = guiCreateWindow(0.3701,0.2435,0.248,0.1471,"",true)
guiWindowSetSizable(resign_confirm_window,false)
guiSetVisible(resign_confirm_window,false)
guiLabelSetColor(guiCreateLabel(0.0512,0.2478,0.9055,0.3009,"Are you sure you want to resign from\nyour job?",true,resign_confirm_window),255,255,0)
resign_yes = guiCreateButton(0.1063,0.6195,0.3386,0.2743,"Yes",true,resign_confirm_window)
resign_no = guiCreateButton(0.5354,0.6195,0.3386,0.2743,"No",true,resign_confirm_window)
 
function makeAnimationGUI()
    animationCategoryList = guiCreateGridList(0.35,0.3,0.15,0.2,true)
    animationList = guiCreateGridList(0.51,0.3,0.15,0.4,true)
    column1 = guiGridListAddColumn(animationCategoryList,"Category",0.-- s8) -->
    column2 = guiGridListAddColumn(animationList,"Animation",0.-- s8) -->
    stopButton = guiCreateButton( 0.21, 0.37, 0.1, 0.04,"Stop Animation",true)
    closeButton = guiCreateButton( 0.56, 0.715, 0.1, 0.04,"Close Animations",true)
    guiSetVisible(animationCategoryList,false)
    guiSetVisible(animationList,false)
    guiSetVisible(stopButton,false)
    guiSetVisible(closeButton,false)
    bindKey("space","down",function() if getPedAnimation (client) then setPedAnimation(client,nil,nil) end end)
    addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(client,nil,nil) end)
    for k, v in ipairs (getElementsByType("animationCategory")) do
    local row = guiGridListAddRow(animationCategoryList)
    guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false)
    end
    addEventHandler("onClientGUIClick",animationCategoryList,getAnimations)
    addEventHandler("onClientGUIClick",animationList,setAnimation)
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI)
 
function getAnimations()
    selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1)
        if (selectedCategory ~= "") then
            guiGridListClear(animationList)
                for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do
                    local row = guiGridListAddRow(animationList)
                    guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false)
                end
        end
        if (selectedCategory == "") then
            guiGridListClear(animationList)
        end
end
 
function setAnimation()
    selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1)
        if (selectedAnimation ~= "") then
            if (not isPedDead(client)) then
                if (isPedInVehicle(client) == false) then
                    local animationBlock = getElementData(getElementByID(selectedAnimation),"block")
                    local animationID = getElementData(getElementByID(selectedAnimation),"code")
                    triggerServerEvent("setAnimation",client,animationBlock,animationID)
                else
                    outputChatBox("You cannot use animations while in a vehicle.",255,0,0)
                end
            else
                outputChatBox("You cannot use animations while you are dead.",255,0,0)
            end
        end
end
 
menuButtons[1] = guiCreateButton( (215/1024)*sWidth, (246/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Locate", false )
menuButtons[2] = guiCreateButton( (215/1024)*sWidth, (361/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Message", false )
menuButtons[3] = guiCreateButton( (215/1024)*sWidth, (399/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Give Money", false )
searchBox = guiCreateEdit( 0.0170, 0.25, 0.2, 0.035, "", true )
menuItemsShadow[1] = guiCreateLabel((309/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItemsShadow[2] = guiCreateLabel((308/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItems[1] = guiCreateLabel((307/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItemsShadow[3] = guiCreateLabel((376/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItemsShadow[4] = guiCreateLabel((375/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItems[2] = guiCreateLabel((374/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItemsShadow[5] = guiCreateLabel((453/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItemsShadow[6] = guiCreateLabel((452/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItems[3] = guiCreateLabel((451/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItemsShadow[7] = guiCreateLabel((533/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItemsShadow[8] = guiCreateLabel((532/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItemsShadow[9] = guiCreateLabel((619/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItemsShadow[10] = guiCreateLabel((620/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItemsShadow[11] = guiCreateLabel((695/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
menuItemsShadow[12] = guiCreateLabel((698/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
menuItems[4] = guiCreateLabel((531/1024)*sWidth, (730/768)*sHeight, (77/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItems[5] = guiCreateLabel((618/1024)*sWidth, (730/768)*sHeight, (65/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItems[6] = guiCreateLabel((695/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
for i,v in pairs(menuItems) do guiSetFont ( v, "default-bold-small" ) guiSetVisible(v,false) end
for i,v in pairs(menuItemsShadow) do guiSetFont ( v, "default-bold-small" ) guiLabelSetColor(v,26,26,26) guiSetVisible(v,false) end
for i,v in pairs(menuButtons) do guiSetVisible(v,false) end
playersGridList = guiCreateGridList((17/1024)*sWidth, (230/768)*sHeight, (205/1024)*sWidth, (307/768)*sHeight,false)
guiGridListAddColumn(playersGridList,"Name:",0.90)
guiSetVisible(playersGridList,false)
guiSetProperty(playersGridList,"AlwaysOnTop","true")
guiSetVisible(searchBox,false)
 
menuData["send_money"]["send"] = guiCreateButton(0.4336,0.4622,0.1035,0.0404,"Send money",true)
menuData["send_money"]["cancel"] = guiCreateButton(0.5547,0.4622,0.1035,0.0404,"Cancel",true)
menuData["send_money"]["label"] = guiCreateLabel(0.4355,0.3828,0.1572,0.0234,"Amount to send:",true)
menuData["send_money"]["edit"] = guiCreateEdit(0.4326,0.4128,0.2256,0.0443,"",true)
for i,v in pairs(menuData["send_money"]) do guiSetVisible(v,false) end
 
menuData["send_message"]["send"] = guiCreateButton(0.4336,0.4622,0.1035,0.0404,"Send message",true)
menuData["send_message"]["cancel"] = guiCreateButton(0.5547,0.4622,0.1035,0.0404,"Cancel",true)
menuData["send_message"]["label"] = guiCreateLabel(0.4355,0.3828,0.1572,0.0234,"Message to send:",true)
menuData["send_message"]["edit"] = guiCreateEdit(0.4326,0.4128,0.2256,0.0443,"",true)
for i,v in pairs(menuData["send_message"]) do guiSetVisible(v,false) end
 
live_support_window = guiCreateWindow(0.2715,0.2201,0.5049,0.418,"tested Live Support",true)
guiWindowSetSizable(live_support_window,false)
guiSetVisible(live_support_window,false)
live_support_memo = guiCreateMemo(0.0174,0.0779,0.6867,0.7788,"",true,live_support_window)
guiMemoSetReadOnly(live_support_memo,true)
live_support_grid = guiCreateGridList(0.7137,0.0997,0.2689,0.7477,true,live_support_window)
guiGridListAddColumn(live_support_grid,"Available support:",0.85)
live_support_edit = guiCreateEdit(0.0174,0.8754,0.6847,0.0841,"",true,live_support_window)
live_support_send = guiCreateButton(0.7157,0.8723,0.1373,0.0841,"Send",true,live_support_window)
live_support_close = guiCreateButton(0.8627,0.8723,0.1199,0.0841,"Close",true,live_support_window)
 
addEventHandler("onClientMouseEnter",getRootElement(),
function()
for i,v in pairs(menuItems) do
if (source == menuItems[i]) then
guiLabelSetColor(source,130,130,130)
    end
  end
end)
 
addEventHandler("onClientMouseLeave",getRootElement(),
function()
for i,v in pairs(menuItems) do
if (source == menuItems[i]) then
guiLabelSetColor(source,255,255,255)
    end
  end
end)
 
function onMenuItemClick()
if (source == menuButtons[1]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
    local playerName = guiGridListGetItemText(playersGridList, row, col)
    exports["(tested)Info"]:locatePlayer(playerName)
    guiMoveToBack(source,true)
    end
elseif (source == menuButtons[2]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
    guiSetInputEnabled(true)
    for i,v in pairs(menuData["send_message"]) do guiSetVisible(v,true) end
    for i,v in pairs(menuButtons) do guiSetEnabled(v, false) end
    guiSetEnabled(playersGridList, false)
    guiMoveToBack(source,true)
    end
elseif (source == menuData["send_message"]["send"]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
   
Edited by Guest
Posted

You write all of this and you don't know how to fix it ???

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
cuz the local server did not show any error so pls any one have idea

i'm pretty sure that it's not your code.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
This script for my server not only me worked on it the whole team so u wanna help or no

Replace it in Client-Side! If this does not help then, it means that this code is stolen...

local sWidth,sHeight = guiGetScreenSize() 
local enabled = false
local menuItems = {}
local menuItemsShadow = {}
local menuButtons = {}
local jobHunt = false
local menuData = {}
local client = getLocalPlayer()
menuData["send_money"] = {}
menuData["send_message"] = {}
local blips = {}
 
function showBlips()
    exports["(tested)Jobs"]:getJobTable(client,true)
end
 
function hideBlips()
    for i,v in pairs(blips) do
        if isElement(v) then destroyElement(v) end
    end
    removeEventHandler("onClientRender",root,drawJobBlips)
end
 
addEvent("returnJobsTable",true)
addEventHandler("returnJobsTable",root,
function (jobTable)
    hideBlips()
    for i,v in pairs(jobTable) do
        if not v.int or tostring(v.int) == nil then
            blips[i] = createBlip(v.x, v.y, v.z, 41, 1, 255, 0, 0, 255, 0, 250)
            setElementData(blips[i], "name", tostring(v.role))
            setElementData(blips[i], "color", {v.r, v.g, v.b})
        end
    end
    addEventHandler("onClientRender",root,drawJobBlips)
end)
 
function renderWelcome()
    local PISTOL = (getPedStat(client, 69)/(10/2.08))
    local SILENCED = (getPedStat(client, 70)/(10/2.08))
    local DESERT = (getPedStat(client, 71)/(10/2.08))
    local SHOTGUN = (getPedStat(client, 72)/(10/2.08))
    local SAWNOFF = (getPedStat(client, 73)/(10/2.08))
    local SPAZ12 = (getPedStat(client, 74)/(10/2.08))
    local UZI = (getPedStat(client, 75)/(10/2.08))
    local MP5 = (getPedStat(client, 76)/(10/2.08))
    local AK47 = (getPedStat(client, 77)/(10/2.08))
    local M4 = (getPedStat(client, 78)/(10/2.08))
    dxDrawRectangle((0/1024)*sWidth, (0/768)*sHeight, (1100/1024)*sWidth, (770/768)*sHeight, tocolor(51,51,51,140), false)
    dxDrawText("Welcome to your User Control Panel",(280/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Welcome to your User Control Panel",(278/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Welcome to your User Control Panel",(276/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(511/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(510/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(508/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawBorderedText("Weapon skills:",(726/1024)*sWidth,(188/768)*sHeight,(924/1024)*sWidth,(211/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*1.0,"bankgothic","left","top",false,false,true)
    dxDrawBorderedText("Colt 45",(807/1024)*sWidth,(231/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(225/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(229/768)*sHeight,(PISTOL/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Colt 45 silenced",(770/1024)*sWidth,(271/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(265/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(269/768)*sHeight,(SILENCED/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Desert Eagle",(790/1024)*sWidth,(311/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)  
    dxDrawImage((740/1024)*sWidth,(305/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(309/768)*sHeight,(DESERT/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Shotgun",(807/1024)*sWidth,(352/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(345/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(349/768)*sHeight,(SHOTGUN/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Sawn Off",(807/1024)*sWidth,(392/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)  
    dxDrawImage((740/1024)*sWidth,(385/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(389/768)*sHeight,(SAWNOFF/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Spaz 12",(814/1024)*sWidth,(432/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(425/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(429/768)*sHeight,(SPAZ12/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Uzi - Tec 9",(808/1024)*sWidth,(472/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(465/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(469/768)*sHeight,(UZI/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("MP5",(840/1024)*sWidth,(512/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(505/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(509/768)*sHeight,(MP5/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("AK 47",(835/1024)*sWidth,(552/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)  
    dxDrawImage((740/1024)*sWidth,(545/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(549/768)*sHeight,(AK47/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("M4",(850/1024)*sWidth,(590/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(585/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(589/768)*sHeight,(M4/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
end
 
job_panel_window = guiCreateWindow(0.3467,0.3294,0.3037,0.2188,"tested Job Panel",true)
guiWindowSetSizable(job_panel_window,false)
guiSetVisible(job_panel_window,false)
job_panel_currentjob = guiCreateLabel(0.0386,0.2083,0.9164,0.1429,"Your current job:",true,job_panel_window)
job_panel_shift = guiCreateButton(0.045,0.7024,0.2637,0.2143,"End shift",true,job_panel_window)
job_panel_resign = guiCreateButton(0.328,0.7083,0.2572,0.2143,"Resign",true,job_panel_window)
job_panel_close = guiCreateButton(0.6077,0.7083,0.2572,0.2143,"Close",true,job_panel_window)
job_panel_hunt = guiCreateCheckBox(0.0386,0.3929,0.926,0.1131,"Job hunt: Show job blips if enabled.",false,true,job_panel_window)
guiCheckBoxSetSelected(job_panel_hunt, jobHunt)
 
resign_confirm_window = guiCreateWindow(0.3701,0.2435,0.248,0.1471,"",true)
guiWindowSetSizable(resign_confirm_window,false)
guiSetVisible(resign_confirm_window,false)
guiLabelSetColor(guiCreateLabel(0.0512,0.2478,0.9055,0.3009,"Are you sure you want to resign from\nyour job?",true,resign_confirm_window),255,255,0)
resign_yes = guiCreateButton(0.1063,0.6195,0.3386,0.2743,"Yes",true,resign_confirm_window)
resign_no = guiCreateButton(0.5354,0.6195,0.3386,0.2743,"No",true,resign_confirm_window)
 
function makeAnimationGUI()
    animationCategoryList = guiCreateGridList(0.35,0.3,0.15,0.2,true)
    animationList = guiCreateGridList(0.51,0.3,0.15,0.4,true)
    column1 = guiGridListAddColumn(animationCategoryList,"Category",0.25)
    column2 = guiGridListAddColumn(animationList,"Animation",0.25)
    stopButton = guiCreateButton( 0.21, 0.37, 0.1, 0.04,"Stop Animation",true)
    closeButton = guiCreateButton( 0.56, 0.715, 0.1, 0.04,"Close Animations",true)
    guiSetVisible(animationCategoryList,false)
    guiSetVisible(animationList,false)
    guiSetVisible(stopButton,false)
    guiSetVisible(closeButton,false)
    bindKey("space","down",function() if getPedAnimation (client) then setPedAnimation(client,nil,nil) end end)
    addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(client,nil,nil) end)
    for k, v in ipairs (getElementsByType("animationCategory")) do
    local row = guiGridListAddRow(animationCategoryList)
    guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false)
    end
    addEventHandler("onClientGUIClick",animationCategoryList,getAnimations)
    addEventHandler("onClientGUIClick",animationList,setAnimation)
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI)
 
function getAnimations()
    selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1)
        if (selectedCategory ~= "") then
            guiGridListClear(animationList)
                for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do
                    local row = guiGridListAddRow(animationList)
                    guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false)
                end
        end
        if (selectedCategory == "") then
            guiGridListClear(animationList)
        end
end
 
function setAnimation()
    selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1)
        if (selectedAnimation ~= "") then
            if (not isPedDead(client)) then
                if (isPedInVehicle(client) == false) then
                    local animationBlock = getElementData(getElementByID(selectedAnimation),"block")
                    local animationID = getElementData(getElementByID(selectedAnimation),"code")
                    triggerServerEvent("setAnimation",client,animationBlock,animationID)
                else
                    outputChatBox("You cannot use animations while in a vehicle.",255,0,0)
                end
            else
                outputChatBox("You cannot use animations while you are dead.",255,0,0)
            end
        end
end
 
menuButtons[1] = guiCreateButton( (215/1024)*sWidth, (246/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Locate", false )
menuButtons[2] = guiCreateButton( (215/1024)*sWidth, (361/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Message", false )
menuButtons[3] = guiCreateButton( (215/1024)*sWidth, (399/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Give Money", false )
searchBox = guiCreateEdit( 0.0170, 0.25, 0.2, 0.035, "", true )
menuItemsShadow[1] = guiCreateLabel((309/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItemsShadow[2] = guiCreateLabel((308/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItems[1] = guiCreateLabel((307/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItemsShadow[3] = guiCreateLabel((376/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItemsShadow[4] = guiCreateLabel((375/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItems[2] = guiCreateLabel((374/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItemsShadow[5] = guiCreateLabel((453/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItemsShadow[6] = guiCreateLabel((452/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItems[3] = guiCreateLabel((451/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItemsShadow[7] = guiCreateLabel((533/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItemsShadow[8] = guiCreateLabel((532/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItemsShadow[9] = guiCreateLabel((619/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItemsShadow[10] = guiCreateLabel((620/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItemsShadow[11] = guiCreateLabel((695/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
menuItemsShadow[12] = guiCreateLabel((698/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
menuItems[4] = guiCreateLabel((531/1024)*sWidth, (730/768)*sHeight, (77/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItems[5] = guiCreateLabel((618/1024)*sWidth, (730/768)*sHeight, (65/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItems[6] = guiCreateLabel((695/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
for i,v in pairs(menuItems) do guiSetFont ( v, "default-bold-small" ) guiSetVisible(v,false) end
for i,v in pairs(menuItemsShadow) do guiSetFont ( v, "default-bold-small" ) guiLabelSetColor(v,26,26,26) guiSetVisible(v,false) end
for i,v in pairs(menuButtons) do guiSetVisible(v,false) end
playersGridList = guiCreateGridList((17/1024)*sWidth, (230/768)*sHeight, (205/1024)*sWidth, (307/768)*sHeight,false)
guiGridListAddColumn(playersGridList,"Name:",0.90)
guiSetVisible(playersGridList,false)
guiSetProperty(playersGridList,"AlwaysOnTop","true")
guiSetVisible(searchBox,false)
 
menuData["send_money"]["send"] = guiCreateButton(0.4336,0.4622,0.1035,0.0404,"Send money",true)
menuData["send_money"]["cancel"] = guiCreateButton(0.5547,0.4622,0.1035,0.0404,"Cancel",true)
menuData["send_money"]["label"] = guiCreateLabel(0.4355,0.3828,0.1572,0.0234,"Amount to send:",true)
menuData["send_money"]["edit"] = guiCreateEdit(0.4326,0.4128,0.2256,0.0443,"",true)
for i,v in pairs(menuData["send_money"]) do guiSetVisible(v,false) end
 
menuData["send_message"]["send"] = guiCreateButton(0.4336,0.4622,0.1035,0.0404,"Send message",true)
menuData["send_message"]["cancel"] = guiCreateButton(0.5547,0.4622,0.1035,0.0404,"Cancel",true)
menuData["send_message"]["label"] = guiCreateLabel(0.4355,0.3828,0.1572,0.0234,"Message to send:",true)
menuData["send_message"]["edit"] = guiCreateEdit(0.4326,0.4128,0.2256,0.0443,"",true)
for i,v in pairs(menuData["send_message"]) do guiSetVisible(v,false) end
 
live_support_window = guiCreateWindow(0.2715,0.2201,0.5049,0.418,"tested Live Support",true)
guiWindowSetSizable(live_support_window,false)
guiSetVisible(live_support_window,false)
live_support_memo = guiCreateMemo(0.0174,0.0779,0.6867,0.7788,"",true,live_support_window)
guiMemoSetReadOnly(live_support_memo,true)
live_support_grid = guiCreateGridList(0.7137,0.0997,0.2689,0.7477,true,live_support_window)
guiGridListAddColumn(live_support_grid,"Available support:",0.85)
live_support_edit = guiCreateEdit(0.0174,0.8754,0.6847,0.0841,"",true,live_support_window)
live_support_send = guiCreateButton(0.7157,0.8723,0.1373,0.0841,"Send",true,live_support_window)
live_support_close = guiCreateButton(0.8627,0.8723,0.1199,0.0841,"Close",true,live_support_window)
 
addEventHandler("onClientMouseEnter",getRootElement(),
function()
for i,v in pairs(menuItems) do
if (source == menuItems[i]) then
guiLabelSetColor(source,130,130,130)
    end
  end
end)
 
addEventHandler("onClientMouseLeave",getRootElement(),
function()
for i,v in pairs(menuItems) do
if (source == menuItems[i]) then
guiLabelSetColor(source,255,255,255)
    end
  end
end)
 
function onMenuItemClick()
if (source == menuButtons[1]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
    local playerName = guiGridListGetItemText(playersGridList, row, col)
    exports["(tested)Info"]:locatePlayer(playerName)
    guiMoveToBack(source,true)
    end
elseif (source == menuButtons[2]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
    guiSetInputEnabled(true)
    for i,v in pairs(menuData["send_message"]) do guiSetVisible(v,true) end
    for i,v in pairs(menuButtons) do guiSetEnabled(v, false) end
    guiSetEnabled(playersGridList, false)
    guiMoveToBack(source,true)
    end
elseif (source == menuData["send_message"]["send"]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
   
350x20_FF0090_FFFFFF_0C0A36_FF0090.png
Posted
This script for my server not only me worked on it the whole team so u wanna help or no

Replace it in Client-Side! If this does not help then, it means that this code is stolen...

local sWidth,sHeight = guiGetScreenSize() 
local enabled = false
local menuItems = {}
local menuItemsShadow = {}
local menuButtons = {}
local jobHunt = false
local menuData = {}
local client = getLocalPlayer()
menuData["send_money"] = {}
menuData["send_message"] = {}
local blips = {}
 
function showBlips()
    exports["(tested)Jobs"]:getJobTable(client,true)
end
 
function hideBlips()
    for i,v in pairs(blips) do
        if isElement(v) then destroyElement(v) end
    end
    removeEventHandler("onClientRender",root,drawJobBlips)
end
 
addEvent("returnJobsTable",true)
addEventHandler("returnJobsTable",root,
function (jobTable)
    hideBlips()
    for i,v in pairs(jobTable) do
        if not v.int or tostring(v.int) == nil then
            blips[i] = createBlip(v.x, v.y, v.z, 41, 1, 255, 0, 0, 255, 0, 250)
            setElementData(blips[i], "name", tostring(v.role))
            setElementData(blips[i], "color", {v.r, v.g, v.b})
        end
    end
    addEventHandler("onClientRender",root,drawJobBlips)
end)
 
function renderWelcome()
    local PISTOL = (getPedStat(client, 69)/(10/2.08))
    local SILENCED = (getPedStat(client, 70)/(10/2.08))
    local DESERT = (getPedStat(client, 71)/(10/2.08))
    local SHOTGUN = (getPedStat(client, 72)/(10/2.08))
    local SAWNOFF = (getPedStat(client, 73)/(10/2.08))
    local SPAZ12 = (getPedStat(client, 74)/(10/2.08))
    local UZI = (getPedStat(client, 75)/(10/2.08))
    local MP5 = (getPedStat(client, 76)/(10/2.08))
    local AK47 = (getPedStat(client, 77)/(10/2.08))
    local M4 = (getPedStat(client, 78)/(10/2.08))
    dxDrawRectangle((0/1024)*sWidth, (0/768)*sHeight, (1100/1024)*sWidth, (770/768)*sHeight, tocolor(51,51,51,140), false)
    dxDrawText("Welcome to your User Control Panel",(280/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Welcome to your User Control Panel",(278/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Welcome to your User Control Panel",(276/1024)*sWidth, (62/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*2.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(511/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(510/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(21,21,21,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawText("Press F5 to enable your controls",(508/1024)*sWidth, (100/768)*sHeight, (675/1024)*sWidth, (137/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*1.5,"default","left","top",false,false,false)
    dxDrawBorderedText("Weapon skills:",(726/1024)*sWidth,(188/768)*sHeight,(924/1024)*sWidth,(211/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*1.0,"bankgothic","left","top",false,false,true)
    dxDrawBorderedText("Colt 45",(807/1024)*sWidth,(231/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(225/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(229/768)*sHeight,(PISTOL/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Colt 45 silenced",(770/1024)*sWidth,(271/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(265/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(269/768)*sHeight,(SILENCED/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Desert Eagle",(790/1024)*sWidth,(311/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)  
    dxDrawImage((740/1024)*sWidth,(305/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(309/768)*sHeight,(DESERT/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Shotgun",(807/1024)*sWidth,(352/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(345/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(349/768)*sHeight,(SHOTGUN/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Sawn Off",(807/1024)*sWidth,(392/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)  
    dxDrawImage((740/1024)*sWidth,(385/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(389/768)*sHeight,(SAWNOFF/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Spaz 12",(814/1024)*sWidth,(432/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(425/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(429/768)*sHeight,(SPAZ12/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("Uzi - Tec 9",(808/1024)*sWidth,(472/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(465/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(469/768)*sHeight,(UZI/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("MP5",(840/1024)*sWidth,(512/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(505/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(509/768)*sHeight,(MP5/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("AK 47",(835/1024)*sWidth,(552/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)  
    dxDrawImage((740/1024)*sWidth,(545/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(549/768)*sHeight,(AK47/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
    dxDrawBorderedText("M4",(850/1024)*sWidth,(590/768)*sHeight,(916/1024)*sWidth,(244/768)*sHeight,tocolor(255,255,255,255),(sWidth/1024)*0.6,"bankgothic","left","top",false,false,true)
    dxDrawImage((740/1024)*sWidth,(585/768)*sHeight,(215/1024)*sWidth,(31/768)*sHeight,"images/BG-Fbar.png",0,0,0,tocolor(0,0,180,255),false)
    dxDrawImage((743/1024)*sWidth,(589/768)*sHeight,(M4/1024)*sWidth,(22/768)*sHeight,"images/PG-Fbar.png",0,0,0,tocolor(155,155,155,255),false)
end
 
job_panel_window = guiCreateWindow(0.3467,0.3294,0.3037,0.2188,"tested Job Panel",true)
guiWindowSetSizable(job_panel_window,false)
guiSetVisible(job_panel_window,false)
job_panel_currentjob = guiCreateLabel(0.0386,0.2083,0.9164,0.1429,"Your current job:",true,job_panel_window)
job_panel_shift = guiCreateButton(0.045,0.7024,0.2637,0.2143,"End shift",true,job_panel_window)
job_panel_resign = guiCreateButton(0.328,0.7083,0.2572,0.2143,"Resign",true,job_panel_window)
job_panel_close = guiCreateButton(0.6077,0.7083,0.2572,0.2143,"Close",true,job_panel_window)
job_panel_hunt = guiCreateCheckBox(0.0386,0.3929,0.926,0.1131,"Job hunt: Show job blips if enabled.",false,true,job_panel_window)
guiCheckBoxSetSelected(job_panel_hunt, jobHunt)
 
resign_confirm_window = guiCreateWindow(0.3701,0.2435,0.248,0.1471,"",true)
guiWindowSetSizable(resign_confirm_window,false)
guiSetVisible(resign_confirm_window,false)
guiLabelSetColor(guiCreateLabel(0.0512,0.2478,0.9055,0.3009,"Are you sure you want to resign from\nyour job?",true,resign_confirm_window),255,255,0)
resign_yes = guiCreateButton(0.1063,0.6195,0.3386,0.2743,"Yes",true,resign_confirm_window)
resign_no = guiCreateButton(0.5354,0.6195,0.3386,0.2743,"No",true,resign_confirm_window)
 
function makeAnimationGUI()
    animationCategoryList = guiCreateGridList(0.35,0.3,0.15,0.2,true)
    animationList = guiCreateGridList(0.51,0.3,0.15,0.4,true)
    column1 = guiGridListAddColumn(animationCategoryList,"Category",0.25)
    column2 = guiGridListAddColumn(animationList,"Animation",0.25)
    stopButton = guiCreateButton( 0.21, 0.37, 0.1, 0.04,"Stop Animation",true)
    closeButton = guiCreateButton( 0.56, 0.715, 0.1, 0.04,"Close Animations",true)
    guiSetVisible(animationCategoryList,false)
    guiSetVisible(animationList,false)
    guiSetVisible(stopButton,false)
    guiSetVisible(closeButton,false)
    bindKey("space","down",function() if getPedAnimation (client) then setPedAnimation(client,nil,nil) end end)
    addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(client,nil,nil) end)
    for k, v in ipairs (getElementsByType("animationCategory")) do
    local row = guiGridListAddRow(animationCategoryList)
    guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false)
    end
    addEventHandler("onClientGUIClick",animationCategoryList,getAnimations)
    addEventHandler("onClientGUIClick",animationList,setAnimation)
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI)
 
function getAnimations()
    selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1)
        if (selectedCategory ~= "") then
            guiGridListClear(animationList)
                for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do
                    local row = guiGridListAddRow(animationList)
                    guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false)
                end
        end
        if (selectedCategory == "") then
            guiGridListClear(animationList)
        end
end
 
function setAnimation()
    selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1)
        if (selectedAnimation ~= "") then
            if (not isPedDead(client)) then
                if (isPedInVehicle(client) == false) then
                    local animationBlock = getElementData(getElementByID(selectedAnimation),"block")
                    local animationID = getElementData(getElementByID(selectedAnimation),"code")
                    triggerServerEvent("setAnimation",client,animationBlock,animationID)
                else
                    outputChatBox("You cannot use animations while in a vehicle.",255,0,0)
                end
            else
                outputChatBox("You cannot use animations while you are dead.",255,0,0)
            end
        end
end
 
menuButtons[1] = guiCreateButton( (215/1024)*sWidth, (246/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Locate", false )
menuButtons[2] = guiCreateButton( (215/1024)*sWidth, (361/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Message", false )
menuButtons[3] = guiCreateButton( (215/1024)*sWidth, (399/768)*sHeight, (102/1024)*sWidth, (31/768)*sHeight, "Give Money", false )
searchBox = guiCreateEdit( 0.0170, 0.25, 0.2, 0.035, "", true )
menuItemsShadow[1] = guiCreateLabel((309/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItemsShadow[2] = guiCreateLabel((308/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItems[1] = guiCreateLabel((307/1024)*sWidth, (730/768)*sHeight, (61/1024)*sWidth, (15/768)*sHeight,"Job Panel",false)
menuItemsShadow[3] = guiCreateLabel((376/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItemsShadow[4] = guiCreateLabel((375/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItems[2] = guiCreateLabel((374/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"My Vehicles",false)
menuItemsShadow[5] = guiCreateLabel((453/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItemsShadow[6] = guiCreateLabel((452/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItems[3] = guiCreateLabel((451/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Animations",false)
menuItemsShadow[7] = guiCreateLabel((533/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItemsShadow[8] = guiCreateLabel((532/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItemsShadow[9] = guiCreateLabel((619/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItemsShadow[10] = guiCreateLabel((620/1024)*sWidth, (730/768)*sHeight, (67/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItemsShadow[11] = guiCreateLabel((695/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
menuItemsShadow[12] = guiCreateLabel((698/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
menuItems[4] = guiCreateLabel((531/1024)*sWidth, (730/768)*sHeight, (77/1024)*sWidth, (15/768)*sHeight,"Live Support",false)
menuItems[5] = guiCreateLabel((618/1024)*sWidth, (730/768)*sHeight, (65/1024)*sWidth, (15/768)*sHeight,"Help Panel",false)
menuItems[6] = guiCreateLabel((695/1024)*sWidth, (730/768)*sHeight, (95/1024)*sWidth, (15/768)*sHeight,"Drugs Inventory",false)
for i,v in pairs(menuItems) do guiSetFont ( v, "default-bold-small" ) guiSetVisible(v,false) end
for i,v in pairs(menuItemsShadow) do guiSetFont ( v, "default-bold-small" ) guiLabelSetColor(v,26,26,26) guiSetVisible(v,false) end
for i,v in pairs(menuButtons) do guiSetVisible(v,false) end
playersGridList = guiCreateGridList((17/1024)*sWidth, (230/768)*sHeight, (205/1024)*sWidth, (307/768)*sHeight,false)
guiGridListAddColumn(playersGridList,"Name:",0.90)
guiSetVisible(playersGridList,false)
guiSetProperty(playersGridList,"AlwaysOnTop","true")
guiSetVisible(searchBox,false)
 
menuData["send_money"]["send"] = guiCreateButton(0.4336,0.4622,0.1035,0.0404,"Send money",true)
menuData["send_money"]["cancel"] = guiCreateButton(0.5547,0.4622,0.1035,0.0404,"Cancel",true)
menuData["send_money"]["label"] = guiCreateLabel(0.4355,0.3828,0.1572,0.0234,"Amount to send:",true)
menuData["send_money"]["edit"] = guiCreateEdit(0.4326,0.4128,0.2256,0.0443,"",true)
for i,v in pairs(menuData["send_money"]) do guiSetVisible(v,false) end
 
menuData["send_message"]["send"] = guiCreateButton(0.4336,0.4622,0.1035,0.0404,"Send message",true)
menuData["send_message"]["cancel"] = guiCreateButton(0.5547,0.4622,0.1035,0.0404,"Cancel",true)
menuData["send_message"]["label"] = guiCreateLabel(0.4355,0.3828,0.1572,0.0234,"Message to send:",true)
menuData["send_message"]["edit"] = guiCreateEdit(0.4326,0.4128,0.2256,0.0443,"",true)
for i,v in pairs(menuData["send_message"]) do guiSetVisible(v,false) end
 
live_support_window = guiCreateWindow(0.2715,0.2201,0.5049,0.418,"tested Live Support",true)
guiWindowSetSizable(live_support_window,false)
guiSetVisible(live_support_window,false)
live_support_memo = guiCreateMemo(0.0174,0.0779,0.6867,0.7788,"",true,live_support_window)
guiMemoSetReadOnly(live_support_memo,true)
live_support_grid = guiCreateGridList(0.7137,0.0997,0.2689,0.7477,true,live_support_window)
guiGridListAddColumn(live_support_grid,"Available support:",0.85)
live_support_edit = guiCreateEdit(0.0174,0.8754,0.6847,0.0841,"",true,live_support_window)
live_support_send = guiCreateButton(0.7157,0.8723,0.1373,0.0841,"Send",true,live_support_window)
live_support_close = guiCreateButton(0.8627,0.8723,0.1199,0.0841,"Close",true,live_support_window)
 
addEventHandler("onClientMouseEnter",getRootElement(),
function()
for i,v in pairs(menuItems) do
if (source == menuItems[i]) then
guiLabelSetColor(source,130,130,130)
    end
  end
end)
 
addEventHandler("onClientMouseLeave",getRootElement(),
function()
for i,v in pairs(menuItems) do
if (source == menuItems[i]) then
guiLabelSetColor(source,255,255,255)
    end
  end
end)
 
function onMenuItemClick()
if (source == menuButtons[1]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
    local playerName = guiGridListGetItemText(playersGridList, row, col)
    exports["(tested)Info"]:locatePlayer(playerName)
    guiMoveToBack(source,true)
    end
elseif (source == menuButtons[2]) then
    local row,col = guiGridListGetSelectedItem(playersGridList)
    if row and col and row ~= -1 and col ~= -1 then
    guiSetInputEnabled(true)
    for i,v in pairs(menuData["send_message"]) do guiSetVisible(v,true) end
    for i,v in pairs(menuButtons) do guiSetEnabled(v, false) end
    guiSetEnabled(playersGridList, false)
    guiMoveToBack(source,true)
    end
elseif (source == menuData["send_message"]["send"]) then
   
Posted
Lol Okay Okay! eeeeerrrhhhm...

dude it stopped working

any one can fix iam willing to pay 10$ who will fix it

Its all about exports! you have to have scripts associated with it!

350x20_FF0090_FFFFFF_0C0A36_FF0090.png
Posted
i have all exports and they are working

Without that it is not possible to fix! I can fix it and make it working, but it will not have the proper structure.

350x20_FF0090_FFFFFF_0C0A36_FF0090.png

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...