Jump to content

INVINCIBLE

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by INVINCIBLE

  1. INVINCIBLE

    Help Font.

    srfont = dxCreateFont("font.ttf",13) g_GuiLabel = { } function GuiShow() if g_Settings.Visible then g_GuiLabel.Speed:visible(true) g_GuiLabel.Unit:visible(true) end end addEventHandler("onClientScreenFadedIn", root, GuiShow) function GuiHide() g_GuiLabel.Speed:visible(false) g_GuiLabel.Unit:visible(false) end addEventHandler("onClientScreenFadedOut", root, GuiHide) function GuiInitialize() local screenWidth, screenHeight = guiGetScreenSize() g_GuiLabel.Speed = dxText:create("0", screenWidth-72, screenHeight - 36, false, srfont, 2, "right") g_GuiLabel.Speed:type("stroke", 3, 0, 0, 0, 255) g_GuiLabel.Speed:color(0,170,255,255) g_GuiLabel.Unit = dxText:create("", screenWidth-64, screenHeight - 28, false, srfont, 1, "left") g_GuiLabel.Unit:type("stroke", 2, 0, 0, 0, 255) g_GuiLabel.Unit:color(255,255,255,255) GuiHide() end GuiInitialize()
  2. INVINCIBLE

    im good?

    Try this : exports.scoreboard:scoreboardAddColumn( "Top Times") function someoneReachedHunter(number, sort, model) if sort == "vehiclechange" and model == 425 then top = getElementData(source,"Top Times") or 0 setElementData(source,"Top Times",top+1) end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter)
  3. okee..but u can write a example with race_toptimes ( hunter toptimes on communty)
  4. -- client.lua --- Try this: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(270,216,449,476,"Panel",false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,20,431,394,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"maps",1.2) GUIEditor_Button[1] = guiCreateButton(12,419,190,46,"Refresh MapList",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(258,419,182,46,"Buy Map!",false,GUIEditor_Window[1]) guiSetVisible( GUIEditor_Window[1], false ) showCursor ( false ) function getMaps() setTimer(callServerFunction,500,1,"getServerMaps",getLocalPlayer()) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),getMaps) --maps tab function loadMaps(gamemodeMapTable, gamemode, map) guiGridListClear(GUIEditor_Grid[1]) if gamemodeMapTable then aGamemodeMapTable = gamemodeMapTable for id,gamemode in pairs (gamemodeMapTable) do if (gamemode.name == "Race") then for id,map in ipairs (gamemode.maps) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, map.name, false, false ) end end end end end function callClientFunction(funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do arg[key] = tonumber(value) or value end end loadstring("return "..funcname)()(unpack(arg)) end addEvent("onServerCallsClientFunction", true) addEventHandler("onServerCallsClientFunction", resourceRoot, callClientFunction) -- -- Call server function -- function callServerFunction(funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do if (type(value) == "number") then arg[key] = tostring(value) end end end triggerServerEvent("onClientCallsServerFunction", resourceRoot , funcname, unpack(arg)) end function oppenz() if guiGetVisible ( GUIEditor_Window[1] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F6","down",oppenz) server.lua Try this: function callServerFunction(funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do arg[key] = tonumber(value) or value end end loadstring("return "..funcname)()(unpack(arg)) end addEvent("onClientCallsServerFunction", true) addEventHandler("onClientCallsServerFunction", getRootElement() , callServerFunction) function callClientFunction(client, funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do if (type(value) == "number") then arg[key] = tostring(value) end end end triggerClientEvent(client, "onServerCallsClientFunction", getRootElement(), funcname, unpack(arg or {})) end function getServerMaps (loadList) local tableOut if loadList then tableOut = {} local gamemodes = {} gamemodes = call(getResourceFromName("mapmanager"), "getGamemodes") for id,gamemode in ipairs (gamemodes) do tableOut[id] = {} tableOut[id].name = getResourceInfo(gamemode, "name") or getResourceName(gamemode) tableOut[id].resname = getResourceName(gamemode) tableOut[id].maps = {} local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode" , gamemode) for _,map in ipairs (maps) do table.insert(tableOut[id]["maps"] ,{name = getResourceInfo(map, "name") or getResourceName(map), resname = getResourceName(map) }) end table.sort(tableOut[id]["maps"], sortCompareFunction) end table.sort((tableOut), sortCompareFunction) table.insert(tableOut, {name = "no gamemode", resname = "no gamemode", maps = {}}) local countGmodes = #tableOut local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode") for id,map in ipairs (maps) do table.insert(tableOut[countGmodes]["maps"] ,{name = getResourceInfo(map, "name") or getResourceName(map), resname = getResourceName(map) }) end table.sort(tableOut[countGmodes]["maps"], sortCompareFunction) end local map = call(getResourceFromName("mapmanager"), "getRunningGamemodeMap") local gamemode = call(getResourceFromName("mapmanager"), "getRunningGamemode") gamemode = gamemode and getResourceName(gamemode) or "N/A" map = map and getResourceName(map) or "N/A" callClientFunction(loadList,"loadMaps", tableOut, gamemode, map) end function sortCompareFunction(s1, s2) if type(s1) == "table" and type(s2) == "table" then s1, s2 = s1.name, s2.name end s1, s2 = s1:lower(), s2:lower() if s1 == s2 then return false end local byte1, byte2 = string.byte(s1:sub(1,1)), string.byte(s2:sub(1,1)) if not byte1 then return true elseif not byte2 then return false elseif byte1 < byte2 then return true elseif byte1 == byte2 then return sortCompareFunction(s1:sub(2), s2:sub(2)) else return false end end function callGetMaps() for i,player in ipairs(getElementsByType("player")) do triggerClientEvent(player,"getMaps") end end addCommandHandler("rebuildMaps",callGetMaps) i've tested,its work
  5. You dont undestand me cadu12 I want select a map and see map's toptimes on labels.
  6. you understand me wrong. 1:Click a map on maplist [ userpanel ] -- i have created new one. 2:I want see selected map's toptime 1-2-3 on labels.
  7. Example picture I'm making a userpanel.I have created a gui.I want click a map and show on gui labels toptimes 1-2-3. I dont know how i can make it.Give me a example. Sorry my bad english Thanks for help
×
×
  • Create New...