Jump to content

SuperM

Members
  • Content Count

    27
  • Joined

  • Last visited

Everything posted by SuperM

  1. SuperM

    Marker Height

    Well RIP me My markes is clientside no clue how can I create it serverside and use his name (refrence) clientside ahah And I also think players will not be able to see it if it's severside?
  2. SuperM

    Marker Height

    Is it possible to define a marker height? Because I have one inside A51 and people can access it from outside...
  3. Hello there, I have some problem with the script because it identifies some words as bad words and they are not it the list, part of the code is this one: local BWords = { {"top-"}, } local message = string.gsub(table.concat({...}, " "), "#%x%x%x%x%x%x", "") local name = string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "") for i, data in ipairs(BWords) do if string.find(message, data[1]) or pregFind(message,"([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})") then ...rest of the cod
  4. By leaving it like that, in also only shows the Translated one. Already tested with a lot of ways but not sure why I'm not getting the Original value. But thanks for trying to help!
  5. Also if I add something like this: guiGridListSetItemText(giveWindowGridlist, row, 1, Translated, false, false) guiGridListSetItemText(giveWindowGridlist, row, 2, Original, false, false) guiGridListSetItemData(giveWindowGridlist, row, 2, {Translated,Original}) and then on the other code something like this: local Translated = guiGridListGetItemText(giveWindowGridlist,guiGridListGetSelectedItem(giveWindowGridlist),1) local test1,test2 = unpack(guiGridListGetItemData(giveWindowGridlist, guiGridListGetSelectedItem(giveWindowGridlist),2)) I will get the following error:
  6. I got your point, now I have a Admin panel where I want to add custom functions in order to work completely with the mod and I have the following function: addEventHandler("onClientGUIComboBoxAccepted", giveWindowCombobox, function() guiGridListClear(giveWindowGridlist) local text = guiComboBoxGetItemText(giveWindowCombobox,guiComboBoxGetSelected(giveWindowCombobox)) outputDebugString(text) for i,item in ipairs(items[text]) do local row = guiGridListAddRow(giveWindowGridlist) Translated = exports.text:getLanguageTextClient(item) Original = item guiGridListSetItem
  7. Hello there, I'm trying to understand part of the code, can please someone help me and tell me what is what please. The part of the code is the following: function updateItems() guiGridListClear(shop_gui.gridlist[2]) local category = guiGridListGetItemText(shop_gui.gridlist[1],guiGridListGetSelectedItem(shop_gui.gridlist[1])) if (category ~= "") then for i,v in pairs(shop_items) do if (i == shop_type) then for i,v in pairs(v) do if (i == shop_marker) then for i,v in ipairs(v[category]) do local row = guiGridListAddRow(shop_gui.gridlist[2])
  8. Thanks, find it just had to use the setElementData and it updates.
  9. Can't find one updateElementData is this one? https://wiki.multitheftauto.com/wiki/OnElementDataChange
  10. Hello there, I have a dxDrawText showing a value from DB, but when the player presses H it will change the value in the DB but it does not change in the dxDrawText, is there any way to make it update when the player presses H and executes the server side function to update the sql value? --Client function Draw() local object = getElementsByType("object") for k,element in ipairs(object) do if getElementModel(element) == 1319 then infid = getElementData(element, "SM:ID") text1 = "ID: "..tostring(infid) dxDrawTextOnElement (element, text1, 1.3, _, _, _, _, _, 3, _, tocolor(
  11. Still getting just one outputDebugString with "INFO: nil" And my query is workig, this is what I get from SQL when I run it:
  12. Alright, with that line of code, I'm getting just a single outputDebugString and it says "INFO: nil"
  13. At the moment I have the following code: --SERVER function ttttt(source) local result1 = mysql:query("SELECT id, x, y, z, rotation, dimension, interior FROM test WHERE id=1") local rowID1 = mysql:fetch_assoc(result1) local ID1 = tonumber(rowID1["id"]) local X1 = tonumber(rowID1["x"]) local Y1 = tonumber(rowID1["y"]) local Z1 = tonumber(rowID1["z"]) local Rotation1 = tonumber(rowID1["rotation"]) local Dimension1 = tonumber(rowID1["dimension"]) local Interior1 = tonumber(rowID1["interior"]) triggerClientEvent(source, 'ResultsDataB', source, result1); end add
  14. With your line of code I'm getting this error: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil]
  15. I have done the following: --SERVER local result1 = mysql:query("SELECT id, x, y, z, rotation, dimension, interior FROM table") local rowID1 = mysql:fetch_assoc(result1) local ID1 = tonumber(rowID1["id"]) local X1 = tonumber(rowID1["x"]) local Y1 = tonumber(rowID1["y"]) local Z1 = tonumber(rowID1["z"]) local Rotation1 = tonumber(rowID1["rotation"]) local Dimension1 = tonumber(rowID1["dimension"]) local Interior1 = tonumber(rowID1["interior"]) triggerClientEvent(source, 'ResultsDataB', result1); --Client addEvent('ResultsDataB', true) addEventHandler('ResultsDataB', resourceRoot
  16. Hello there I have the following script: --SERVER SIDE FILE if getElementModel(source) == 1000 then ID = getElementID(source) end local result = mysql:query("SELECT id, x, y, z, rotation, dimension, interior FROM table WHERE id=".. ID .."") local rowID = mysql:fetch_assoc(result) local ID = tonumber(rowID["id"]) local X = tonumber(rowID["x"]) local Y = tonumber(rowID["y"]) local Z = tonumber(rowID["z"]) local Rotation = tonumber(rowID["rotation"]) local Dimension = tonumber(rowID["dimension"]) local Interior = tonumber(rowID["interior"]) --CLIENT SIDE FILE function Draw() local object
  17. Hello there, I need some help, I have no clue on how to make a command that need two values to be correct with that I mean something like this: /setvalue 1 100 Where 1 would be the ID of the interior ot something else and the 100 would be the value of that interior... How on my function I can tell that the user must write both numbers for example interior ID and Value and not only the Value or the ID??? I need to be able to change the value in SQL of one object that is inside one interior and for that the player must tell the object ID and the Value that he wants to se
  18. Hello there, How can I split lines in a Lua file for example how do I turn this code: outputChatBox ( "#FF0000Helloaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaelloaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaelloaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaelloaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaelloaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaelloaaaaaaaaaaaaaaa
  19. Hello there and thanks you so much for your help! I still have a problem, at the moment I'm getting the object position from database and the line of code is this one: local Object = createObject(row["objectID"], row["X"], row["Y"], row["Z"], row["RX"], row["RY"], row["RZ"]) and my output to the server is the following one: 1569, 1796, -1744.5, 12.6, 0, 0, 180.5 So if if i was scripting it it should look like this: createObject ( 1569, 1796, -1744.5, 12.6, 0, 0, 180.5 ) How can I add those Frozen parameter to it? I mean I was checking the page https://wiki
  20. Hello there, I need some help because I have no clue on how to prevent for example item id 1569 object (ADAM_V_DOOR) from open when punched. If you place it on the map and you punch it, it will open, but when it returns to is original position if you punch it will not open, how can I prevent it from open al the time, I need it to block th entrance and for that it can't move.
  21. But my example only has one Polygon colshape, just need the height limited so, for example, people flying (freecam or similar) using planes, helicopters don't get detected.
  22. I have the following area: but I would like to limit height, is there any chance that I can limit the height so it does not go to "infinite"?
  23. Just trying to make some kind of alarm system around vinewood houses, like the area of the property where you have "motion sensors" would activate the alarm when someone enters in the area
×
×
  • Create New...