Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. I don't like, sucks. Better DX but I can't make something good All I create sucks
  2. drk

    Skin take

    Dude, I posted the errors of your code. I posted MINE CODE perfectly working. What you need more? Wanna see the full script working?? viewtopic.php?f=91&t=41760&start=15#p422832
  3. drk

    Skin take

    And the answer is: YOUR CODE DOESN'T WORKS.
  4. Resource 'sql' isn't running because can't connect to MySQL.
  5. drk

    Skin take

    I don't need to solve the issues of your code. I posted a working code. +1
  6. drk

    Skin take

    Am? Work? Are you kidding me? You put the code in a file, create a resource, start it and search for errors. No errors, working. Good. STOP SAYING THAT YOUR CODE WORK NORMALLY. YOUR CODE IS TOTALLY WRONG. Learn: viewtopic.php?f=148&t=40809
  7. drk

    Skin take

    lockSkins = { [287] = true, [121] = true } function onDeathPickupHit ( player, matchingDimension ) local skin = getElementModel(player) if ( lockSkins[skin] ) then if ( matchingDimension ) then -- no need removeEventHandler ( "onPickupHit", source, onDeathPickupHit ) -- idk if it's needed local weaponPickup = getPickupWeapon( player ) -- wrong destroyElement( player ) -- wrong giveWeapon( player, weapon, false ) -- wrong local weapon = getPedWeapon( player ) -- wrong end else cancelEvent() outputChatBox("*Só militares podem pegar esta arma.", player, 255, 0, 0) end end local function destroyDeathPickup( pickup ) removeEventHandler( "onPickupHit", pickup, onDeathPickupHit ) destroyElement( pickup ) end addEventHandler("onPlayerWasted", root, function (totalammo, killer, killerweapon, bodypart) local timeout = 60000 local x, y, z = getElementPosition( source ) local currentweapon = getPedWeapon( source ) local totalammo = getPedTotalAmmo( source ) local pickup = createPickup( x, y, z, 2, currentweapon, timeout, totalammo ) addEventHandler( "onPickupHit", pickup, onDeathPickupHit ) setTimer( destroyDeathPickup, timeout, 1, pickup ) -- idk why need function end)
  8. drk

    Skin take

    Your server must be magic to run this. Wanna see where are errors in your code? Basically, in all the code.
  9. drk

    Skin take

    Good for you. You need start learning Lua DNL291. You're trying destroy player element and some other things that I've not seen. YOUR CODE IS TOTALLY WRONG.
  10. drk

    Skin take

    You want to create a weapon pickup when player dies and only the skins you choose can get them, right?
  11. drk

    Skin take

    Anyway, your code is wrong.
  12. drk

    Skin take

    Also, your code is wrong DNL291. You're trying to destroy player oO Good work
  13. drk

    Skin take

    DNL291, why change my code?? Mine was correct. No need to change my code.
  14. Yes, another mta bug.. It's what I don't like in MTA: Infinite possibilities, infinite bugs
  15. Before you die, you're in a vehicle?
  16. http://bugs.mtasa.com/view.php?id=6909
  17. drk

    Skin take

    Why don't use the fucking tables? Isn't more easy for him add skins?? And why you simply copy examples / other scripts DNL291? As far as I know, he want this: local skins = { [ 287 ] = true; [ 121 ] = true }; addEventHandler ( 'onPlayerWasted', root, function ( uAmmo, uKiller, uWeapon, uPart ) if ( skins [ getElementModel ( source ) ] ) then local x, y, z = getElementPosition ( source ) local cWeapon = getPedWeapon ( source ) thePickup = createPickup ( x, y, z, 2, cWeapon, 10000, uAmmo ); addEventHandler ( 'onPickupHit', thePickup, getPickup ) else return end end ) function getPickup ( player ) if ( skins [ getElementModel ( player ) ] ) then giveWeapon ( player, getPickupWeapon ( source ), getPickupAmmo ( source ) ); end end This creates a pickup when you die if you have any skin of the table. Then anyone who haves a skin of table can take the weapon.
  18. drk

    Locked time

    X-SHADOW Lua tags aren't bugged LOL.
  19. drk

    gui

    Ah Forgot
  20. drk

    gui

    Nop Kenix. https://wiki.multitheftauto.com/wiki/GuiWindowSetMovable
  21. Oh. addEvent ( 'levelUp', true ); addEventHandler ( 'levelUp', root, function ( ) if ( getElementData ( source, 'theLevel' ) == 'Level1' ) then outputChatBox ( 'dafuq', source, 255, 255, 255, false ); end end )
  22. You don't need learn all, at least 3 because some don't have all. It's not like just read the pages and you will be a pro. You need understand how works and how to use / when to use.
  23. Maybe. Show a example.
×
×
  • Create New...