Jump to content

SQLite Questions|


HustraDev

Recommended Posts

Posted

Hello World, :fadein:

i think the most Database Language Used in Script's The SQLite So i'm Thinking to use it in New Script :D

ShowCar , with Spawn And Destroy

So i need some function and Event's To use it Can anyone give it to me ? :roll:

Thanks ~ :D

Posted
executeSQLQuery 

ok but How to Create The database file the function you give it to me Create TABLE and colname

and How to add colname to gridlist in GUI and Thanks So fast reply :mrgreen:

Posted

It will be better for you to google it. I'm on phone so I can't write lua code so I copied a code from aibo's post and made some changes.

-- server: 
  
addEvent("IneedMaps", true) 
addEventHandler("IneedMaps", getRootElement(),  
  
function (player) 
  local mapTable = {} 
  for i, map in ipairs(exports.mapmanager:getMapsCompatibleWithGamemode(getResourceFromName("race"))) do 
    table.insert(mapTable, getResourceInfo(map, "name")) -- this will add map to list by MAP NAME 
    --table.insert(mapTable, getResourceName(map)) -- this will add map by its RESOURCE NAME 
  end 
  triggerClientEvent(player, "mapListUpdate", getRootElement(), mapTable) 
end) 
  
  

-- client: 
  
setTimer(function()triggerServerEvent ("IneedMaps",localPlayer) end,2000,1) 
  
  
local list = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true) 
local column = guiGridListAddColumn( list, "Player", 0.85 ) 
  
addEvent("mapListUpdate", true) 
addEventHandler("mapListUpdate", getRootElement(),  
function(maps) 
  guiGridListClear(list) 
  for i, map in ipairs(maps) do 
    local row = guiGridListAddRow(list) 
    guiGridListSetItemText(list, row, column, map, false, false) 
  end 
end) 

Posted
It will be better for you to google it. I'm on phone so I can't write lua code so I copied a code from aibo's post and made some changes.
-- server: 
  
addEvent("IneedMaps", true) 
addEventHandler("IneedMaps", getRootElement(),  
  
function (player) 
  local mapTable = {} 
  for i, map in ipairs(exports.mapmanager:getMapsCompatibleWithGamemode(getResourceFromName("race"))) do 
    table.insert(mapTable, getResourceInfo(map, "name")) -- this will add map to list by MAP NAME 
    --table.insert(mapTable, getResourceName(map)) -- this will add map by its RESOURCE NAME 
  end 
  triggerClientEvent(player, "mapListUpdate", getRootElement(), mapTable) 
end) 
  
  

-- client: 
  
setTimer(function()triggerServerEvent ("IneedMaps",localPlayer) end,2000,1) 
  
  
local list = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true) 
local column = guiGridListAddColumn( list, "Player", 0.85 ) 
  
addEvent("mapListUpdate", true) 
addEventHandler("mapListUpdate", getRootElement(),  
function(maps) 
  guiGridListClear(list) 
  for i, map in ipairs(maps) do 
    local row = guiGridListAddRow(list) 
    guiGridListSetItemText(list, row, column, map, false, false) 
  end 
end) 

Thanks Man Finally i Get it :D

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