this is example
you can do something like this
function sendData(player)
local query = dbQuery(handler,"select * from table")
if #query > 0 then
for i,k in ipairs(query) do
triggerClientEvent(player,"eventName",getRootElement(),k.colName1,k.colName2, . . .,k.colNamen)
end
end
end
Hope it will help you
you can pass player reference as formal argument in function and you can process the statements in that functions using that player reference. Then all statements will be executed for that player reference not for all server players.
Hi all i just started making tutorial on MTA:SA scripting.
Here is how you can create a carlock script which can lock cars on various parameters like : user,acl,team,gang,group etc.
SQLITE database is used to store and load cars . Because of database it will be more faster and better from I/O data from files.
For any query please post in comments or email at : [email protected]
For bug report please post in comments or email at : [email protected](Please specify script name in subject.)
Part - 1
Part -2
Part-3
Part-4
Part -1
Implementing GUI
Part -2
Implementing GUI
Download code : https://community.multitheftauto.com/index.php?p ... s&id=13088
Mirror : https://www.dropbox.com/sh/pkeaigtvw7k0 ... M6GNa?dl=0
https://wiki.multitheftauto.com/wiki/InterpolateBetween
Here u can read about creating animations and just use timer so that after 5 sec it again animate
Hello i created a DX Clan system which 70% work like a SAES one because i love it . Full created from scratch. All resolution fix gui
Intrested people can add me skype : cadell.cadell
Here are some SCreen Shots
video(Please watch in HD)
There is activation key system for script if you buy it send us your server ip we produce one key and send you that just at starting of script enter it and it will work like a charm. This authentication is added so that even script get stolen or something still no one can use it except owner.
Color is changeable
hello i am using community script name dxGUI i created a grid list using that but i want to know how i can take selected value and process it further as i created list it show all player account name so i want to perform some action on selected data but i am unable to know how i can get that value and use further any one can help plz
u want to compare if player is in any gang then cant spawn police else do
local getPlayergang = exports.NGGroups:getPlayerGroup(player)
if getPlayergang == "gangname here" then
outputChatbox"u cant u r in gang"
else
--your spawn stuff
end
local row = guiGridListGetSelectedItem(logadmin)
if row ~= -1 then
local id = guiGridListGetItemData(logadmin, row, 1)
if deletecondition then
triggerServerEvent("delete", localPlayer, id)
end
end
now use server
addEvent("delete", true)
addEventHandler("delete", getRootElement(),
function(id)
if id then
if dbExec(connection,'DELETE FROM table WHERE id=?', id) then
outputChatBox("log Deleted",source, 100, 100, 100)
end
end
end
)
hope this will help you
and use id for all u r info or instead of id get title name or etc compare and u done
id INTEGER PRIMARY KEY
here is my table structure ^^
here is how all stuff store in tables ^^
But working is wrong i want if i select Los Santos then it show me only team name squads not gangs as i want it to come under las venture like under s table at last its defined where this spawn need to come but i dont know how to compare and show matched data.
i get result like this at the moment
Please help me