-
Posts
6,089 -
Joined
-
Last visited
-
Days Won
216
Everything posted by IIYAMA
-
@Sisqo0 Did you know that there are id functions available? Which are very similar to those that are used in html/css/js. https://wiki.multitheftauto.com/wiki/SetElementID https://wiki.multitheftauto.com/wiki/GetElementByID
-
How to disable vehicle impact with breakable objects?
IIYAMA replied to Behnam-Edit's topic in Scripting
https://wiki.multitheftauto.com/wiki/EngineSetObjectGroupPhysicalProperty https://wiki.multitheftauto.com/wiki/EngineSetModelPhysicalPropertiesGroup Some new functions you can try. -
I am not sure which version you are using. But the resource might be working fine for your server, if you do the following: Remove the following line from your meta.xml <min_mta_version server="???" client="???" /> But be aware that you might see some warnings, which are related to functions that are not available inside of your server (version). setPedsLODDistance = available ??? setVehiclesLODDistance = available ??? Updating your server, might be handy if you want to be able to use the resources that use the newest features.
- 27 replies
-
- 1
-
-
- repository
- draw
-
(and 8 more)
Tagged with:
-
The resource has been unpacked, which is already a change. (not required to unpack, except in special cases) The resource name has been changed, since it original is written lowercase. Which are not really changes that can cause big problems... but you definitely did make changes. What happens if you use the /refreshall command as administrator? Check the server window to see if there are any errors and if the resource is available.
- 27 replies
-
- repository
- draw
-
(and 8 more)
Tagged with:
-
Add the keyword: in for k,msg in ipairs (badwords) do Syntax: http://www.Lua.org/manual/5.1/manual.html#pdf-ipairs
-
What did you try? Because setPlayerHudComponentVisible works, unless another script overwrite it's state.
-
local position = "15,20,18" local x, y, z = unpack(split(position, ","))
-
function deluxe ( ) local player = client addEventHandler doesn't work the same as the addCommandHandler. Use the predefined variable `client`, to get the player that did activate the event.
- 2 replies
-
- 1
-
-
- triggerserverevent
- got
-
(and 1 more)
Tagged with:
-
That is not really an issue, since it doesn't freezes the code. The database will just queue the queries and not execute them in parallel. Creating tables is something you should do once, not every time you start your script. Or are you talking about saving player data when you stop the resource?
- 1 reply
-
- 1
-
-
if not p then return true -- there is no parent? end for i=1,5000 do local data = dgsElementData[p] if not data then error("Data mismatch... go spam thisdp", 2) end if not data.visible then return false end p = FatherTable[p] if not p then break end end hmmm maybe... ? can't test it
-
Probably because your url contains an invalid protocol notation. Make sure to use https:// or http://
-
The functions that @Tut provided are the way to go to achieve that. You can find here an example resource on how to use the second function:
-
Then you probably need to replace that with: local vehicle = getElementData(player, "repairingvehicle");
-
bindKey getPedOccupiedVehicle local timer = repairTimer[vehicle] isTimer killTimer repairTimer[vehicle] = nil
-
If the health loss isn't subtracted, you will be able to detect the issue with the pre-event: https://wiki.multitheftauto.com/wiki/OnClientPlayerWeaponFire Since the health didn't change. + getTickCount to check if the damage is done within the same frame. And maybe include the ped task as well for validation.
-
When that occurs, what was the loss value?
-
Also without mods? There are some mods that do have some collision issues.
-
You mean that there is no damage given? If that is the case: You could maybe use: https://wiki.multitheftauto.com/wiki/OnClientPlayerWeaponFire to save the latest player shot and set that as attacker. (with some tricks)
-
Either the vehicle component has no orientation (or maybe the vehicle is streamed out or something else...). if x and y and z then end And if none of components work, then I have no idea.
-
You didn't mess anything up, but it seems the function has been broken somewhere on the versioooon-way. The wiki example didn't work either. local baseElement = createElement("map-dinner") --[[ ]] local element = createObject ( 1337, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 ) setElementParent(element, baseElement) --[[ ]] local file = xmlCreateFile ("map.xml", "map") saveMapData ( file, baseElement, true ) xmlSaveFile ( file ) xmlUnloadFile ( file ) --[[ <map> <object></object> </map> ]] local file = xmlCreateFile("saved.map", "map") if file then saveMapData ( file, getResourceRootElement(getThisResource()), true ) xmlSaveFile ( file ) xmlUnloadFile ( file ) end --[[ <map> <map> <map-dinner> <object></object> </map-dinner> </map> </map> ]] I am going to add a bug report. https://github.com/multitheftauto/mtasa-blue/issues/1473
-
An alternative is to save an specific part of the element tree. Pick the method that works best for you. local file = xmlCreateFile ("map.xml", "map") local baseElement = createElement("temporary") --[[ ]] local element = -- createObject, createVehicle, etc. etc, setElementParent(element, baseElement) --[[ ]] saveMapData ( file, baseElement ) xmlSaveFile ( file ) xmlUnloadFile ( file ) destroyElement(baseElement) -- destroy every element, parent as well as the children thanks to propagation Pro's Flexibility, you do not have to write specific code for other elements. Cons: Serverside only No custom properties with special characters, for example : notations and code comments on the fly. All properties are copied, you do not have fully control which ones are saved.
-
Looks very nice! ? Btw. you have currently tagged your topic as [SHOW], you might want to consider change it to [REL] since you actually released it.
- 14 replies
-
- 1
-
-
- mstu
- multi slection tool
-
(and 1 more)
Tagged with:
-
dano = {} function bloquear(source) dano[source] = 1 setTimer(tirar,8000,1,source) end addEventHandler ( "onPlayerDamage", root, bloquear ) function tirar(source) dano[source] = 0 end function clientPickupHit(thePlayer,pickup, matchingDimension) local pickupType = getPickupType( source ) if (dano[player] == 1) then if (pickupType == 0) or (pickupType == 1) then outputChatBox("Não é possivel pegar pickup em combate!",player, 255, 0, 0) cancelEvent() end end end addEventHandler("onPickupHit", root, clientPickupHit)