Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. Like this? old = split(theTime[1]['time'],':')
  2. How can I compare the time passed with the top time ? local time = exports.race:getTimePassed( ) local min, sec = convertTime(time) --if time is better than the top 1 theTime = executeSQLQuery( "SELECT time FROM Top WHERE map = '" ..mapName.. "'" ) if time >= theTime[1]['time'] then triggerEvent('onGotTop',source) --update top executeSQLQuery( "UPDATE Top SET player= '"..player.."', time= '"..min..":"..sec.."' WHERE map='"..mapName.."'" ) I don't know how I can compare because theTime[1]['time'] is a string
  3. drk

    Seconds to minutes

    Just worked! Thanks and sorry for being noob.
  4. drk

    Seconds to minutes

    Sorry for being noob, but it only appear minutes, not the seconds
  5. drk

    Seconds to minutes

    Ah. Sorry, my bad, I'm crazy today
  6. drk

    Seconds to minutes

    I tried: local time = msToSeconds( exports.race:getTimePassed( ) ) local converted = convertTime(time) msToSeconds: function msToSeconds( int ) if type( int ) == 'number' then return int/1000 end return false end But it return 0 minutes.
  7. No problem.
  8. drk

    Seconds to minutes

    It will be like 24:53?
  9. Shit, sorry LOL I'm crazy today, read my last post again .-.
  10. I used getTimePassed() to get the time of the player, it returns miliseconds, then I converted to seconds, and how to convert to minutes? Example: I get 2.456 seconds Then I want to convert 2.456 seconds to --:-- minutes ( -- is the time )
  11. "And you are too lazy" - I'm not talking about u
  12. And you are too lazy to see that I said "Post the whole code".
  13. I'll send full code via PM.
  14. Now it working, but when I change the map and put the other again it don't gets my top. Appear: No one
  15. drk

    Nitro Color

    No and as far as I know it isn't possible to change nitro color without shader because nitro color is a particle ( I think, I don't know if it is) If I'm not right sorry
  16. Ok
  17. It's possible to set the text of a dx text in server side ?
  18. drk

    Nitro Color

    /nitro R G B or /nitro R G B A ( i don't remember ) Just try
  19. Thanks dude. It worked !
  20. msToSeconds ( time ) ? time = exports.race:getTimePassed()
  21. How can I convert miliseconds to seconds ( ms outputed by getTimePassed() )??
  22. drk

    Nitro Color

    If you don't want to script, download shader_nitro and put in the server Then type /nitro 255 255 255 or /nitro 0 0 0 to change the color.
  23. drk

    setPedArmor

    LOL, Evil you not made it. What you did: function Armor (thePlayer) setPedArmor(source,100) -- why you put source here and put thePlayer argument in function? oO end addEventHandler('onPlayerSpawn',root,Armor) Right: function Armor() setPedArmor(source,100) end addEventHandler('onPlayerSpawn',root,Armor)
  24. Thanks
  25. Only more one thing, race getTimePassed function return a string or number?
×
×
  • Create New...