Jump to content

Cadell

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by Cadell

  1. 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
  2. Cadell

    Help

    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.
  3. 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
  4. Cadell

    attach

    Try function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = function() createFire ( -2815.18, 470.16, 4.86, 2) end attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( fire, 99999999, 1,true) end addCommandHandler ( "fire", fireRocks )
  5. Cadell

    animation

    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
  6. 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
  7. i m using dxgui list and it return userdata value when use get fucntion in it '
  8. 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
  9. Cadell

    [HELP] MySQL

    make u r mysql user remote access from u r cpanel
  10. Cadell

    Group types

    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
  11. 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
  12. 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
  13. Thanks but i want to compare 1 tablr value with other and then specific take that value which matches
  14. I want to compare t table 1st entry with s table last entry and set that result in grid and same i want for t table with c table its like city-》select class-> result which have that class and all data in grid
  15. Any 1 plz help i really want this working --- Help plz
  16. hi i am making a spawn panel thing but having problem with matching 2 table data with each other and only show result which get match i am using this c = { {"Los Santos"}, {"Las Venture"} } t = { {"Squads",0,0,150,"Los Santos"}, {"Gangs",150,0,0,"Las Venture"} } s = { {"F.B.I HQ",133.933,-85.56,1.45,"270","1,20",0,255,0,"Everyone","23.25","information22","Squads"}, {"B-Crew",133.933,-85.56,1.45,"270","1,20",0,255,0,"Everyone","23.25","information23","Squads"} } i want to match that s table squads with t table if that match show result which have that same entry and same i want for t with c table . I am doing this in client file local cities = {} for i,v in ipairs(c) do cityname = v[1] cities[cityname] = {} for i,v in ipairs(t) do classname = v[1] cities[cityname][classname] = {} for i,v in ipairs(s) do skinName = v[1] cities[cityname][classname][skinName] = {} cities[cityname][classname][skinName]["spawnX"] = v[2] cities[cityname][classname][skinName]["spawnY"] = v[3] cities[cityname][classname][skinName]["spawnZ"] = v[4] cities[cityname][classname][skinName]["rot"] = v[5] cities[cityname][classname][skinName]["r"] = v[7] cities[cityname][classname][skinName]["g"] = v[8] cities[cityname][classname][skinName]["b"] = v[9] cities[cityname][classname][skinName]["skins"] = {} local skinID = v[6] cities[cityname][classname][skinName]["skins"] = split(skinID, ",") cities[cityname][classname][skinName]["permission"] = v[10] cities[cityname][classname][skinName]["weapons"] = v[11] cities[cityname][classname][skinName]["information"] = v[12] cities[cityname][classname][skinName]["team"] = v[13] end end end On class click function local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) local classSkins = cities[cityName][className] for i, v in pairs(classSkins) do local row = guiGridListAddRow(spawnGridList) guiGridListSetItemText(spawnGridList, row, 1, i, false, false) end Really want it as fast as possible fixed please help me
  17. Cadell

    [HELP] sqlite

    hope this will help you local insertQuery = dbQuery(handler,"SELECT last_insert_rowid() FROM `tablename`") local iq = dbPoll(insertQuery,-1) local insertID = iq[1]["last_insert_rowid()"]
  18. Btw its not mysql script and stop using leaked script this is leaked script of wss rpg
  19. download mysql lib file from mta wiki and then upload it to u r linux libs folder
  20. Use setelement on spawn setelwmwnt vehicle vip or blaaa and on spawn check if get element data return false esle spawn return tru
  21. Give this a try function setUP ( ) setTimer(makeThisWorking, 500, 0) setTimer(noFalse, 500, 0) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setUP) function makeThisWorking ( ) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do local rank = getElementData(thePlayer, "Rank") local xp = getElementData(thePlayer, "XP") local level = getElementData(thePlayer, "Level") if (rank) == false then setElementData(thePlayer, "XP", dfX ) setElementData(thePlayer, "Rank", dfR ) setElementData(thePlayer, "Level", dfL ) setElementData(thePlayer, "XPTNR", dfXN ) elseif (xp) == false then setElementData(thePlayer, "XP", dfX ) setElementData(thePlayer, "Rank", dfR ) setElementData(thePlayer, "Level", dfL ) setElementData(thePlayer, "XPTNR", dfXN ) elseif (level) == false then setElementData(thePlayer, "XP", dfX ) setElementData(thePlayer, "Rank", dfR ) setElementData(thePlayer, "Level", dfL ) setElementData(thePlayer, "XPTNR", dfXN ) end end end
  22. What you mean with special way? To write use notepad++ and for more about lua visit lua.org
×
×
  • Create New...