Jump to content

xyz

Members
  • Posts

    78
  • Joined

  • Last visited

Everything posted by xyz

  1. I'm in progress of making an update script that works with SQL, I have done everything else, uploading into the database and etc. But I can't figure out how to get the text from the database. Client function addUpdatesFromDB_c(o) guiSetText(updates_memo, string.gsub(o)) end addEvent("addUpdatesFromDatabase", true) addEventHandler("addUpdatesFromDatabase", getRootElement(), addUpdatesFromDB_c) Server function loadDatabase(qh) local res = dbPoll(qh, 0) for i, o in pairs(res) do triggerClientEvent("addUpdatesFromDatabase", root, o) end end dbQuery(loadDatabase, {}, connect, "SELECT u_txt FROM updates_table") Everything else works, uploading etc.
  2. xyz

    Search box

    No, I mean like when I type into an edit box, and the items in the gridlist next to it change to the ones you need, like a box for searching, how can I make that?
  3. xyz

    Search box

    No, I mean like when I type into an edit box, and the items in the gridlist next to it change to the ones you need, like a box for searching, how can I make that?
  4. xyz

    Search box

    So I have made a few GUIs with gridlists, I'd like to make a search box as there are many rows in there. How can I make a search box? I mean by like typing into a edit box etc.
  5. I have NO idea why these tables just wont work, other tables in my scripts work but these just don't want to work, what the hell is wrong? '}' expected (to close '{' at line 1) near '{' hijackSpawnLocations = { {407.2060546875, -1317.748046875, 14.8968334198}, {1987.4150390625, -1219.77734375, 20.0234375}, {706.1728515625, -1627.5732421875, 3.4375}, {1627.3935546875, -1516.0615234375, 13.604349136353}, {1254.90234375, -2026.1435546875, 59.565620422363}, {2469.4697265625, -2070.9326171875, 13.546875} {402, 1359.490234375, -1663.4287109375, 8.609375}, } hijackVehicleIDs = { {402}, {434}, {492}, {551}, {496}, {445}, } deliveryLocations = { {1315.8544921875, -1379.6435546875, 12.742877960205}, {2772.787109375, -1606.0068359375, 9.921875}, {1716.384765625, -1921.58984375, 12.566222190857}, {370.3857421875, -2079.5712890625, 6.8359375}, {2156.2705078125, -1134.7431640625, 24.420726776123}, {2791.4453125, -2096.521484375, 10.388750076294}, }
  6. attempt to concatenate global 'vn' (a nil value)
  7. I can't get the vehicle name into a GUI from server, it just gives me a nil Client function getVehicleFromServer(plr) local sc = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local sctxt = guiGridListGetItemText(GUIEditor.gridlist[1], sc, 1) local plr = getPlayerFromName(sctxt) triggerServerEvent("getVeh", localPlayer, plr) end function returnVeh(vehn) guiSetText(GUIEditor.label[24], "Vehicle: "..vn) end addEvent("returnVeh_c", true) addEventHandler("returnVeh_c", getRootElement(), returnVeh) Server function getveh(plr) local veh = getPedOccupiedVehicle(plr) local vn = getVehicleName(veh) triggerClientEvent("returnVeh_c", source, vehn) end addEvent("getVeh", true) addEventHandler("getVeh", getRootElement(), getveh)
  8. Hey. I was wondering what functions are used for playing videos from youtube in a location. I don't need anything else but the functions needed, if you know then post them below, thanks.
  9. xyz

    Help with spawning

    I don't know how to get the closest hospital as I said. Get player position Get hospital position What then?
  10. xyz

    Help with spawning

    I know that I have to use that, but how can I get the hospital with the closest range to the player that was killed
  11. xyz

    Help with spawning

    That looks like it spawns them randomly, I want it to be like spawn the person to the closest hospital.
  12. I'm in middle of making a hospital spawn script, but how can I get the respawns from table and spawn the player to the one that is nearest? local LSH = {2030.03125, -1418.8076171875, 16.9921875} local LSMH = {2030.03515625, -1418.8623046875, 16.9921875} local hospitals = {LSH, LSMH} function respawn(player) spawnPlayer() fadeCamera(player, true) setCameraTarget(player, player) end
  13. It's saying this again lol: client.lua:149: bad argument #1 to 'ipairs' (table expected, got nil)
  14. Bad argument @ guiGridListSetItemText [expected string at argument 4, got table]
  15. client.lua:149: bad argument #1 to 'ipairs' (table expected, got nil)
  16. Hey, so I couldn't figure out how can I get all ACL Groups to a gridlist. This is the client part function getAclGroupsClient() triggerServerEvent("s_getAclGroups_c", localPlayer) end function getAclGroupsFromServer(aclGroups) for aclK, aclV in ipairs(aclGroups) do guiGridListClear(GUIEditor.gridlist[2]) local aclRow = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2], aclRow, aclColumn, aclGroups, false, false) end end addEvent("getAclGroupsFromServer", true) addEventHandler("getAclGroupsFromServer", getRootElement(), getAclGroupsFromServer) Server part function getAclGroups_s() local aclGroups = aclGroupList() triggerClientEvent("getAclGroupsFromServer", source, aclGroups) end addEvent("s_getAclGroups_c", true) addEventHandler("s_getAclGroups_c", getRootElement(), getAclGroups_s)
  17. xyz

    Player blips

    Yeah I know that, but how does the join/quit thing work? Someone told me about isElement but I didnt get it
  18. xyz

    Player blips

    Is there any short way to add a blip on a player when he joins and remove it when he leaves, also change the blips color when he changes his team?
  19. Doesnt work
  20. Doesn't work.
  21. Doesn't work.
  22. function onQuit()local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", walk) endendaddEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc)local walk = getAccountData(acc, "wstyle") setPedWalkingStyle(source, walk)endaddEventHandler("onPlayerLogin", getRootElement(), onLogin)
  23. function onQuit() local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", walk) end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") setPedWalkingStyle(source, walk) end addEventHandler("onPlayerLogin", getRootElement(), onLogin)
  24. So I'm nearly done with my saving system, but I can't save walking style, it wont work..
  25. So I'm nearly done with my saving system, but I can't save walking style, it wont work..
×
×
  • Create New...