Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. Example: local startTick = getTickCount() -- That will give me the current TickCount: Lets say It's: 8394573485734 -- A little later, we do pretty much the same thing again. local endTick = getTickCount() -- Lets say It's: 8394573985734 now local tick = endTick - startTick -- This would be 500000 milliseconds. Thats the time that has passed between startTick and endTick. -- If you cant to convert this to hours, you can do: local hours = ( ( endTick / 1000 ) / 60 ) / 60 print( hours ) -- >> 0.138888889 I understood already, anyway thanks.
  2. Thank you, I understand now this :~
  3. drk

    xml

    No. onMapStarting event is server-side and must be added. You should use onClientMapStarting + get map name + execute functions.
  4. Thank you, I understand now this shit
  5. Your code is totally wrong. You should download vEnom dx functions and put them in your script, then you can use them.
  6. lol Open files and fix errors.
  7. Hi guys! I've seen something about getTickCount on wiki but I can't understand why it's needed to subtract start tick count and end tick count like here: https://wiki.multitheftauto.com/wiki/GetTickCount Someone can explain me?
  8. Seems like your code have errors Blaster, you should fix them.
  9. Start resource "mysql", "global" and "account-system". Add these scripts to the Admin group and upgrade text format to UTF-8 of the needed scripts.
  10. drk

    xml

    No problem.
  11. drk

    xml

    getResourceName ( exports['mapmanager']:getRunningGamemodeMap ( ) )
  12. drk

    xml

    not working can you give me a example to use on mapInfo function? addEvent("onMapStarting",true) addEventHandler ( 'onMapStarting', root, function ( mapInfo ) local resource = getResourceName ( mapInfo ) local mapname = getResourceInfo(exports.mapmanager:getRunningGamemodeMap(),"name") local author = getResourceInfo(exports.mapmanager:getRunningGamemodeMap(),"author") local lastTimePlayed = timestampToDate(mapInfo.lastTimePlayed) local xml = xmlLoadFile("data/ratings.xml") if ( xml ) then local index = findIndexByName ( mapname ) if ( index ) then local map = xmlFindChild ( xml, "map", index ) local rating = xmlNodeGetAttribute ( map, "rating" ) local ratedBy = xmlNodeGetAttribute ( map, "ratedBy" ) local played = xmlNodeGetAttribute ( map, "played" ) triggerClientEvent(source,"INFO",getRootElement(),mapname,author,rating,ratedBy,played,lastTimePlayed) else outputChatBox ( "Map not found in our ratings list. " ..mapname, getRootElement(), 255, 0, 0, true ) end else outputChatBox ( "Unable to load map ratings XML file.", getRootElement(), 255, 0, 0, true ) end end ) is that right? mapInfo isn't a function. mapInfo is a table. And your code is wrong, you're trying to get table resource name. You should use mapInfo.name to get map name.
  13. drk

    Bug race script.

    That's not the problem. You should learn Lua instead of asking these things. If you don't know what's 'trigger' and 'call', learn.
  14. drk

    Bug race script.

    Do you know what is 'Trigger' and 'Call' ?
  15. drk

    Bug race script.

    I will not see 260 lines of unecessary code. I asked if the event "setNextMap" is called, not for the code.
  16. drk

    Bug race script.

    I can't see the problem. Is the event "setNextMap" called?
  17. drk

    Bug race script.

    Where is onClientRender event?
  18. drk

    Bug race script.

    I can't. Upload to PasteBin or put here.
  19. drk

    Bug race script.

    Maybe showing the code, no?
  20. attachElements Player is a element. Object too.
  21. * FACEPALM * I said what is wrong, you haven't found it.
  22. Remove local from the elements and will be global. local -> makes the variable local, this is: You can only use it in a piece of code.
×
×
  • Create New...