Jump to content

Ab-47

Members
  • Posts

    367
  • Joined

  • Last visited

Everything posted by Ab-47

  1. Delete your second code and replace it with: function fixandpay(player) setPedAnimation( player, "BD_FIRE", "wash_up ",-1,false,false,nil,false) outputChatBox (".............",player,255,0,0,false) end function commandon (player) if (player and isElement (player) and getElementType (player) == "player") and (not isPedInVehicle (player)) then if (source == attachedmarker) then if (isElementWithinMarker(player)) then outputChatBox (".................",player,255,0,0,false) fixandpay() else return end end end end addCommandHandler ( "fix", commandon ) Then tell me your response. Basically what I've did is, cleared up the code a bit as yours was kinda messy, replaced 'hitElement' with player, as player was defined in your function, removed those useless command/event handlers and added a function to check whether the player is within the marker or not. What you did, you created a marker attached to a vehicle and added an event handler that when you enter the marker a command handler is initiated and then removed, which makes no sense. You've used an un-defined definition, 'hitElement' and most of your code was useless :3 I've left scripting and MTA for a while due to exams, so I'm sorry if my code didn't help.. thanks for trying to help me you have fault if (isElementWithinMarker(player,attachedmarker)) then but i got an error says "Expected marker at argument 2 got nill." You did include your marker part did you? local attachedmarker = createMarker (0,0,0,"cylinder",1.2,0,255,255,180) attachElements ( attachedmarker, car, 0, 3, -1 ) ?
  2. Delete your second code and replace it with: function fixandpay(player) setPedAnimation( player, "BD_FIRE", "wash_up ",-1,false,false,nil,false) outputChatBox (".............",player,255,0,0,false) end function commandon (player) if (player and isElement (player) and getElementType (player) == "player") and (not isPedInVehicle (player)) then if (source == attachedmarker) then if (isElementWithinMarker(player)) then outputChatBox (".................",player,255,0,0,false) fixandpay() else return end end end end addCommandHandler ( "fix", commandon ) Then tell me your response. Basically what I've did is, cleared up the code a bit as yours was kinda messy, replaced 'hitElement' with player, as player was defined in your function, removed those useless command/event handlers and added a function to check whether the player is within the marker or not. What you did, you created a marker attached to a vehicle and added an event handler that when you enter the marker a command handler is initiated and then removed, which makes no sense. You've used an un-defined definition, 'hitElement' and most of your code was useless :3 I've left scripting and MTA for a while due to exams, so I'm sorry if my code didn't help..
  3. Try positioning argument 'Z' to 1 unit ahead of it's original. Otherwise post your code.
  4. Use; onClientGUIClick and guiGridListGetSelectedItem
  5. Ab-47

    about PlaySound

    Post your full code so we can understand your problem even better.
  6. Woah dude, just looking at your server file, I wouldn't even move onto debugging errors on your client side file. You've already defined the account and added a check to see if the account exists or not AND you already have a function taking place, why enter a function within a function? But then you've added the same check and same defined variable within that function too. Delete the extra function, delete the extra variable definition and the check. Then finish of your first function and end it, then create a separate function using your event handler and finish that off. Once all of that is done, post your new code and we'll help you diagnose any problems if you find there are any.. Oh and /debugscript 3 for more details about errors in your code.
  7. Lol, post your client side code. I'm sure your problem lies between triggering across file types. Furthermore, use /debugscript 3 and tell us what bad arguments are being output.
  8. Ab-47

    Progressbar

    How about post the code you've made and we'll try fix it up or notify where you went wrong?
  9. Ab-47

    The last reply

    I miss the old thread players Lets have a moment of silence for the ones who actually got this topic this far .-. Which is me, me and me.. Oh and some other freaks hahahaha
  10. Have you tried triggering your function? addEventHandler
  11. Ab-47

    İ need help!

    What is 'source' for if you already have the player defined?
  12. Dude -.- wouldn't it save you a heck lot of time if you used; setBlipVisibleDistance ??
  13. Ab-47

    The last reply

    Did you miss me? ;D
  14. Thank god it's finally prevented.. I hated those cheaters who 'coincidently' run faster than everyone.
  15. Try rendering dxDrawImage Event- onClientRender Func- dxDrawImage You can also use Twerky's concept; Like; local initiated = false bindKey("n","down", function() if (initiated == false) then initiated = true addEventHandler("onClientRender", root, drawImage) else removeEventHandler("onClientRender", root, drawImage) initiated = false return end end) function drawImage() dxDrawImage(x, y, h, w, "file.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) --Just change the arguments. end
  16. You can start by learning https://wiki.multitheftauto.com/wiki/Se ... _functions MTA wiki provides all kinds of information relating SQL.
  17. Only solution to not making players wait so long is to reduce your code size or/and if you have any mods/textures etc. find one which isn't so large and replace it.
  18. Ab-47

    The last reply

    I like Aeroplanes
  19. Once you download all resources, you don't have to download them again on your next visit to the server, only a few resource updates etc. I don't quite get you with cars and skins connecting to an ACL group.. Do you mean restrict players not in a specific ACL group from using those cars and skins?
  20. Ab-47

    The last reply

    I think the thread owner bribed an MTA moderator to count posts so that his thread reaches 1000 pages?
  21. Ab-47

    The last reply

    I'm le B.L.A.S.T genius Discoverer of the free world! ... idk why I said that just wanted to
×
×
  • Create New...