Jump to content

Bonus

Members
  • Posts

    297
  • Joined

  • Last visited

Everything posted by Bonus

  1. 1. You mean when the player is in the same dimension, but another position (not in the marker), the output does still come? Are there other player on the server? "l_5_0" is not the player, "thePlayer" is the player. And why don't you just attach the event on the marker (instead of getRootElement())? 2. https://wiki.multitheftauto.com/wiki/SetPedWalkingStyle 126 is "MOVE_DRUNKMAN"
  2. The crosshair-size shows the accuracy of the next shot. If it's the normal size, the next shot will go right where you aim, right through the middle. If the crosshair got bigger, the shot won't go through the middle, it will go somewhere else in a specific radius to the middle-point. So you can do two things: 1. Increase the accuracy of the weapon (with setWeaponProperty) 2. Deactivate the crosshair and draw your own crosshair with dxDrawImage - but then the crosshair won't show the accuracy of the next shot anymore.
  3. Sry, but it's hard to understand what you want, cause your english is pretty bad. What exactly is the problem?
  4. You could name the function "fadeText" and use a boolean for fade-in or fade-out. Also you should maybe use local variables, cause right now there is the risk that this code could break some other clientside codes, if the user used too many global variables, too. I don't like the performance of the script, but I think it won't get used that often.
  5. Damageproof = it gets no damage It's about the RHINO not GETTING damage!
  6. He is talking about disabling damageproof ... I didn't really work with rhinos, but you could use onVehicleDamage and set the Health by yourself.
  7. Freeze the ped ... Make the animation not interruptable ... What do you mean with "stopped"? Why should the ped move while doing the animation?
  8. I think one of the if-statements is false. Just put an outputDebugString/outputChatBox in every line, counting up. That way you can see where the script stops.
  9. Still use getDistanceBetweenPoints3D.
  10. Use always getDistanceBetweenPoints3D to compare positions (or your own calculation)
  11. 1. You should use good names for the variables. I see 1_7_0 etc. everywhere, isn't that confusing? 2. You can compare getElementPosition (which returns 3 values) with numbers like that. If you want to compare them, you have to do it one by one. 3. Don't check the position like that, cause if the player is 0.01 x away from the position, it won't work. Use getDistanceBetweenPoints3D instead. https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D The distance should be smaller than 2+, whatever you want. But not too less.
  12. Bonus

    newResource

    newResourceName is a table, not a string. Just use the "New resource loaded:" output instead of line 18 (newResources[#newResources + 1] ...). And use getResourceName ( v ) instead of newResourceName. Then you can also remove line 15 (local newResources = {}).
  13. In line 34 "thePlayer" doesn't exist. Use the correct variable.
  14. setTimer(verificar, 1000, 1, THEPLAYER) You have to give the player as an argument.
  15. How do you use verificar? The error says that thePlayer is nil. That means you are using verificar wrong.
  16. Try to start the scoreboard resource, does it work?
  17. 1. Indexing starts at 1 in Lua, not 0. 2. Can you post your full code? ped[1] should be a table, not nil.
  18. Bonus

    newResource

    Your for loop doesn't do anything, use it properly and you got it.
  19. Read the infos in the wiki page for dxDrawText.
  20. Save the last 10 (or whatever) passwords in a table. Then do math.random until the password isn't one of the 10 (or whatever) passwords.
  21. Do you mean math.random? http://lua-users.org/wiki/MathLibraryTutorial
  22. Did you already find out? It's easy mathematics: 1000 milliseconds are 1 second 60 seconds are 1 minute So: 1 minute = 60 * 1000 milliseconds = 60000 milliseconds Then you only have to round down: function msToMinutes ( ms ) ms = tonumber ( ms ) if ms then -- 60000 ms = 1 minute local minutes = math.floor ( ms / 60000 ) -- 1000 ms = 1 second local restseconds = math.floor ( ms / 1000 - minutes * 60 ) local restms = ms - restseconds * 60 - minutes * 60000 return minutes, restseconds, restms end end
  23. 1. consider vehicles: killer: an element representing the player or vehicle who was the killer. If there was no killer this is false. 2. Any errors? How do you know that the scripts doesn't identify the killers name?
×
×
  • Create New...