Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. So, just multiply 'theSeek' by 1000.
  2. local ld = dbQuery ( hconnect, "SELECT `Guns` FROM `users` WHERE `Name`=?", username ) local result = dbPoll ( ld, -1 ) local guns = fromJSON ( result [ 1 ].Guns ) if ( type ( guns ) == "table" ) then for _, weapon in pairs ( guns ) do if ( weapon.gun and weapon.ammo ) then giveWeapon ( source, weapon.gun, weapon.ammo ) end end end
  3. local guns = { } for slot = 0, 12 do guns [ slot ] = { gun = getPedWeapon ( source, slot ), ammo = getPedTotalAmmo ( source, slot ) } end local save = dbExec ( hconnect, "UPDATE `users` SET `Guns`=? WHERE `Name`=?", toJSON ( guns ), getPlayerName ( source ) )
  4. Castillo

    Timer :3

    local player local rx, ry = guiGetScreenSize ( ) addEventHandler ( "onClientPlayerWasted", localPlayer, function ( k ) if ( source ~= localPlayer ) then return end if ( isElement ( k ) and getElementType ( k ) == "player" ) then player = k setCameraTarget ( k ) addEventHandler ( "onClientRender", root, killcam ) setTimer ( removeEventHandler, 6000, 1, "onClientRender", root, killcam ) end end ) function killcam ( ) if isElement ( player ) then dxDrawText ( "Viewing Kill Cam of " .. getPlayerName ( player ) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false ) end end
  5. Castillo

    Timer :3

    dxDrawText requires of onClientRender in order to be drawn, you must create a function to draw it, then the timer can add the event handler after 6 seconds.
  6. "theSeek" returns milliseconds or seconds?
  7. Castillo

    Timer :3

    Post the whole script.
  8. Castillo

    Timer :3

    You want to hide it after certain time?
  9. Castillo

    Timer :3

    What do you mean by connect time with that? it doesn't make any sense to me.
  10. Send me the teamviewer details over PM, you obviously don't understand anything. Edit: You don't have any script to give exp at all, try with this one: addEvent ( "onPlayerDestructionDerbyWin", true ) addEventHandler ( "onPlayerDestructionDerbyWin", root, function ( winner ) local randomExp = math.random ( 10, 30 ) exports [ "Level" ]:addPlayerEXP ( winner, randomExp ) outputChatBox ( getPlayerName ( winner ) .." has won ".. randomExp .." experience for winning the map!", root, 0, 255, 0 ) end )
  11. Is that hard to create a new text document and copy what I gave you on it, save, then add to meta.xml like the other scripts?
  12. That's a compiled script, you can't edit it. Make a new script file on the same resource, then add it to the meta.xml.
  13. You mean the scale? if so, you can't change the scale of a label.
  14. Because the script is not magicall, you must use the exported functions to give the players exp when they win, go to the wiki page of the resource to see examples.
  15. You can use loops to make it easier.
  16. You already have asked for help with a script which wasn't yours.
  17. Castillo

    Attach

    Would be a lot more helpful if you tell us what is the error.
  18. You haven't read my post or what?
  19. Always a pleasure to help! And thank you for your kind words .
  20. That's because they aren't like tabs, you must make a system to hide them when you change the selected item.
  21. That's because you forgot to return the element. function guiCreatetextLabel ( text, x, y, w, h, r, g, b, font, relative ) local Label1 = guiCreateLabel ( x, y, w, h, text, relative ) guiLabelSetColor ( Label1, r, g, b ) guiSetFont ( Label1, font ) return Label1 end
×
×
  • Create New...