Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. I will try it out tomorrow also I want to ask you what is the exactly difference between "player" and "thePlayer"? you defined thePlayer not player
  2. I totally overlooked that player instead of thePlayer.
  3. Is this the entire code? where is 'fbpickup' defined? are there any errors (in console or debugscript 3)
  4. The eventhandler was inside the function so you had to call the function first to add the event.
  5. function fbskin(thePlayer) local fac = getElementData(thePlayer,"Faction") local rank = getElementData(thePlayer,"Rank") if (fac == 4) then if (rank == 0) then setElementModel(thePlayer,117) elseif (rank == 1) then setElementModel(thePlayer,163) elseif (rank == 2) then setElementModel(thePlayer,164) elseif (rank == 3) then setElementModel(thePlayer,286) elseif (rank == 4) then setElementModel(thePlayer,166) elseif (rank == 5) then setElementModel(thePlayer,165) end else outputChatBox ( "Вы здесь не работаете!", player, 0,191,255 ) end end addEventHandler( "onMarkerHit", fbpickup, fbskin)
  6. In the .map file there's a line that does this For example. I think this can be added in the map editor not sure tho that's not my field of work
  7. Inside this folder: MTA\server\mods\deathmatch\resources\[gamemodes]\[deathmatch] (example for the deathmatch gamemode) there's a folder called [maps] there you can paste any additional maps
  8. No one will give you anything, especially for free. All free content is listed here: https://community.multitheftauto.com/ If it's not there you can OR hire a scripter OR learn to script. Kind regards
  9. ViRuZGamiing

    help

    What's the source in this case? By what event is the function called?
  10. Please post english in the Scripting forum, for specific languages go to; https://forum.multitheftauto.com/viewforum.php?f=117
  11. There seems to be a pattern tho: Walk in: key = binded Walk out: key = still binded Walk in: key doesn't work Walk out: nothing happens and repeat. EDIT: I've updated my code to make the markers client sided. SERVER CLIENT
  12. The default one has some design options, If I'm right there's a settings button on the right bottom side.
  13. I've made a video showing what's wrong, with the code next to it
  14. ViRuZGamiing

    help

    https://wiki.multitheftauto.com/wiki/TriggerServerEvent pass the data to the server side
  15. Hi guys I'm having trouble unbinding my function, it should happen when I leave marker, it does bind on enter but not on exit. function openTrunk (theVehicle) trunkState = getVehicleDoorOpenRatio(theVehicle, 1) if (trunkState == 0) then setVehicleDoorOpenRatio(theVehicle, 1, 1, 1000) else setVehicleDoorOpenRatio(theVehicle, 1, 0, 1000) end end function bindTrunk (hitElement) if (getElementType (hitElement) == "player") then local linkedVehicle = getElementData(source, "marker") if (isElement (linkedVehicle)) then toggleControl (hitElement, "enter_exit", false) bindKey (hitElement, "f", "down", function() openTrunk(linkedVehicle) end) end end end function unbindTrunk (hitElement) if (getElementType(hitElement) == "player") then toggleControl(hitElement, "enter_exit", true) unbindKey(hitElement, "f", "down", openTrunk) end end I have this as well addEventHandler ( "onMarkerHit", vehMarker, bindTrunk) addEventHandler ( "onMarkerLeave", vehMarker, unbindTrunk) Kind Regards
  16. ViRuZGamiing

    help marker

    I guess there's a typo, getElement, probably had to be, getElementData.
  17. https://wiki.multitheftauto.com/wiki/SetWeaponProperty Make a table with the weapons and their damages and loop through it while adjusting, if you want to change it for multiple or all weapons.
  18. I know but doesn't my way skip 1 step overwriting the 0, but yeah it's not that much of a difference
  19. write \n for an enter in you're string "Welcome to the Faction Panel! \nHere, you can customize your faction!"
  20. function medkit(attacker, weapon) if weapon == (medkitid) then doHeal = true while (doHeal) do health = getElementHealth(source) if (health < 100) then setElementHealth(source, health + 5) else doHeal = false end end end addEventHandler("onPlayerDamage", root, medkit) Not tested, but if you want while shouldn't this work then?
  21. Apart from the 0 you can also use the 1st value, this is how I usually go to work. For example: Array => [8, 4, 2, 3, 7, 9] greatest = array[0] array > greatest ? => greatest = array I hope you understand my 'weird' explanation.
  22. I will try it later, I saw someone doing outlines earlier on the forum
  23. if no-one should be able to see it I suggest turning down the alpha to 0
  24. createMarker comes with an argument called visibleTo, serversided.
  25. Why would you need a element attached, players are elements as well, you could combine setElementStreamable and GetDistanceBetweenPoints3D, if I'm right to get what you're looking for.
×
×
  • Create New...