Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. drk

    Collision

    You wanna make a table with all objects? If is that then: local tObjects = { createObject ( 3437, 5222.7998046875, 755.70001220703, 62.799999237061, 0, 90, 0 ); } for nIndex, uObject in pairs ( tObjects ) do setElementCollisionsEnabled ( uObject, false ); end
  2. drk

    Collision

    Try: oObject = createObject(3437,5222.7998046875,755.70001220703,62.799999237061,0,90,0) setElementCollisionsEnabled ( oObject, false ) Isn't that what you want? Players see object but can drive through it.
  3. getElementData( property, "owner" ) > 0 You're trying to compare userdata "owner" with number "0".
  4. drk

    Help me

    Because it's nil. LOL?
  5. Where setmetatable? Why? You not like prefixes? u = userdata t = table n = number s = string ... I ever forget something
  6. LOL? You think we will create the script for you?? No information, nothing?? Learn, better way.
  7. This? local cTable = { instance = { [1] = 'Crazy'; } } outputChatBox ( cTable.instance[1] ) Basically, is what Solidsnake said
  8. Yes, I like him style Sry, i will not use anymore.
  9. I created this too: local xml = { } function xml:GetNodeValue ( uLoaded, uNode ) setmetatable ( { value1 = uLoaded, value2 = uNode }, xml ) if ( not uLoaded or not uNode or type ( uLoaded ) ~= 'string' or type ( uNode ) ~= 'string' ) then return end local uChild = xmlFindChild ( uLoaded, uNode, 0 ) if ( uChild ) then return xmlNodeGetValue ( uChild ) else return end end Example: -- Do this way: local value = xml:GetNodeValue ( xmlLoadFile ( 'myFile.xml' ), 'country' ) return value -- Instead of local child = xmlFindChild ( xmlLoadFile ( 'myFile.xml' ), 'country', 0 ) if ( child ) then local value = xmlNodeGetValue ( child ) return value else return end Maybe I can make some new functions but I need think about that. Maybe I release my DX Text / DX Rectangle library here too.
  10. Can you explain me why you need str.Repeat when you have "string.rep" wich is much more easy? I created a simple XML Create file function, it's more easy than creating file and saving it. Here: local xml = { } function xml:Create ( uPath, uNode ) setmetatable ( { value1 = uPath, value2 = uNode }, xml ) if ( not uPath or not uNode or type ( uPath ) ~= 'string' or type ( uNode ) ~= 'string' ) then return end local file = xmlCreateFile ( uPath, uNode ) if ( file ) then xmlSaveFile ( file ) return file else return end end If you think that it's not useful, tell me.
  11. drk

    GUI Help

    LOL Just delete old GUI code and put new. Hard? -.-
  12. drk

    GUI Help

    You created a GUI Window for something and now you've created a new one, and want to replace the old with new?
  13. drk

    MySql help

    Check if you have the last mysql module version, it occurred to me too because mysql module version.
  14. Functions and handlers aren't needed, all things out of functions are executed when resource starts
  15. jeremaniak He is talking about John_Michael's web admin panel.
  16. drk

    Help me

    Is your country in the table?
  17. drk

    Convert numbers

    Thanks Aibo, but I don't need anymore I'm using "msToTimeStr" race function and it does the job
  18. drk

    Convert numbers

    Dude, I don't wanna convert a time to put in a script, I need a function to convert time from getTimePassed function to min - sec -.- Why no one understand? Why you think I put the function in the topic? If I want just one time to a script I will not lost my time with a function.
  19. drk

    Convert numbers

    I DON'T WANT ANY MILLISECONDS TO SECONDS CONVERTER. What you don't understand in this ? I need a function to convert ms to minutes, seconds and the problem has been solved already.
  20. No one will work for free.
  21. drk

    Convert numbers

    Dude, why are you posting a miliseconds to seconds converter? -.- Edit: Ok, I used Race "msToTimeStr" function and worked.
  22. drk

    GUI PRoblem :D

    All. addEventHandler ( 'onClientGUIDoubleClick', root, function ( ) if ( source == GUIEditor_Grid[1] ) then guiSetText ( GUIEditor_Label[1], getPlayerName ( elem ) ) end end ) I don't know what element you want to get name, so you need change elem to your element.
  23. drk

    Convert numbers

    Hi all. I need help with time conversion. I'm not good at math and I need convert ms to min:sec. I have a function to convert the time but seconds appear like 0:4 instead of 0:04. I need convert it, can someone help? Function here: function convertTime ( time ) local min = math.floor ( time / 60000 ) local sec = math.floor ( ( time / 1000 ) % 60 ) return min, sec end
×
×
  • Create New...