-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
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
-
I totally overlooked that player instead of thePlayer.
-
Is this the entire code? where is 'fbpickup' defined? are there any errors (in console or debugscript 3)
-
The eventhandler was inside the function so you had to call the function first to add the event.
-
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)
-
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
-
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
-
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
-
What's the source in this case? By what event is the function called?
-
Please post english in the Scripting forum, for specific languages go to; https://forum.multitheftauto.com/viewforum.php?f=117
-
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
-
The default one has some design options, If I'm right there's a settings button on the right bottom side.
-
I've made a video showing what's wrong, with the code next to it
-
https://wiki.multitheftauto.com/wiki/TriggerServerEvent pass the data to the server side
-
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
-
I guess there's a typo, getElement, probably had to be, getElementData.
-
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.
-
I know but doesn't my way skip 1 step overwriting the 0, but yeah it's not that much of a difference
-
write \n for an enter in you're string "Welcome to the Faction Panel! \nHere, you can customize your faction!"
-
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?
-
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.
-
Make player models' visible distance bigger
ViRuZGamiing replied to Xeonmeister's topic in Scripting
I will try it later, I saw someone doing outlines earlier on the forum -
if no-one should be able to see it I suggest turning down the alpha to 0
-
createMarker comes with an argument called visibleTo, serversided.
-
Make player models' visible distance bigger
ViRuZGamiing replied to Xeonmeister's topic in Scripting
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.