-
Posts
6,089 -
Joined
-
Last visited
-
Days Won
216
Everything posted by IIYAMA
-
+ do that per rectangle. Because you do not know which one is in which one.
-
You can use this enchantment, if you really NEED that:
-
It is to me unclear what format the algorithm could be beside tea. So I personally probably wouldn't use it yet, unless I know all the options. But to really answer your question, I don't think there is a big difference at the very end. You are still having 1 key and both functions are provided by MTA. More layers of protection will not help you unless you can make sure that the steps are harder to trace back. One way is to combine client storage with a network message. 1 extra step to make it harder The client has a RAW key. The server has a key. The server sends his key. The client just before decrypting uses the server key to change the RAW key in to the real key. This way the client can't decrypt the files without being connected to your game server. (at least if the key isn't network sniffed before) Why should the client have a key in the first place? If the server sends the only key every time over, there is more risk in it being network sniffed. And don't forget you can use the player serial as salt. This information can't be network sniffed when it is only implemented clientside. 3 risks you have to counter Wiki Packet analyzer Wiki Cheat engine (or something similar) Wrapper functions. Make sure that the script can only be functional with your serverside.
-
It is complex, make sure that your scripting level as well as you arithmetic level is ready for hel(p!)l, I think? If you need some inspiration/options: https://web.archive.org/web/20161128104638/http://crystalmv.net84.net/pages/scripts/npchlc_traffic_editor.php https://web.archive.org/web/20160716203517/http://crystalmv.net84.net/pages/scripts/npchlc_traffic.php https://web.archive.org/web/20170123100149/http://crystalmv.net84.net/pages/scripts/npc_tseq.php
-
It is not possible based on health loss as you noticed. If you want this, you need to apply an overwrite. For explosion you can cancel the explosion event. Replace the explosion with create createexplosion + damage disabled. After that calculate the damage based on the distance. Do this for players, peds and vehicles. Weapon damage is a bit easier, just maintain a static damage value per weapon. (With custom conditions if you desire that). Fire and fall damage are the only damage types that can't be managed very well.
-
It makes the data portable across different applications and storing solutions. In some cases your raw data can break the application, while it will not in the base64 format. For example you can embed with this format images(png/jpg/svg) within your HTML and CSS files. Also it is widely supported by W3C across the web.
-
In that case you should also respect other people their time.
-
What you can change is learning the basics of Lua, so that you read code and understand that copying and pasting more advance code is not clever...
-
What is this entire topic all about if you haven't even wrote a single line of code? Also not even debug and validate the code in a single way? If you did not come here to script, please go discus this in a personal message with the one that did donate the code. This section is not for requesting free code, it is for learning how to code.
-
You could disable the element. https://wiki.multitheftauto.com/wiki/GuiSetEnabled
-
Triggers can't be deleted, only prevented by not trigger them.
-
No, but you might need to apply a delay between line 5 and 6, if you think it is necessary.
-
I see line 6 cancelling line 5? There is absolutely no logic in that. Did you call this function before you did that? (to put a stop to the rendering process) setCustomCameraTarget()
-
So you did this clientside: setCustomCameraTarget() On serverside you did this: setCameraTarget(player, player) What is the delay between those two actions? Did you try to apply them after each other with a delay of 2 seconds?
-
Which methods/implementations are use for that?
-
The issue is caused by not keeping an eye on state changing. The camera status can be changed by resources, but also by MTA conditions (for example dying). If you want to force setCameraMatrix you will need to repeat that process every frame to prevent any interruption. So you could create a resource which will manage all camera statuses and prevent any interruption. And even add extra custom ones. Like moving a camera from position to position.(cinematic effect)
-
You are 'thinking' that the variables are being send over, which is not the case. You can only send the data, which can gets stored in to new variables. Data goes in here: triggerClientEvent(source, 'ResultsDataB', resourceRoot, IN1, IN2, IN3); and come out here: addEventHandler('ResultsDataB', resourceRoot, function(OUT1, OUT2, OUT3) By using the same variable names, you can indeed pretend that you did send them over.
-
triggerClientEvent(source, 'ResultsDataB', resourceRoot, rowID1 ); And debug with iprint. addEventHandler('ResultsDataB', resourceRoot, function(rowID1) iprint(rowID1)
-
Wrong base element provided. See: addEventHandler('ResultsDataB', resourceRoot, function() This event will only trigger when the resourceRoot is provided or a (+n indirect) child of the resourceRoot. A player is not a child or an indirect child of the resourceRoot. See: (players blue and resourceRoot purple) So to solve that issue. triggerClientEvent(source, 'ResultsDataB', resourceRoot, result1);
-
Yes and no. It does have some limitations, when it comes to multiple resources. You can't assign children to parents of different resources. A possible way around: Resource 1 local vehicleParent = createElement("vehicleParent") local newVehicle newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) Resource 2 local vehicleParent = createElement("vehicleParent") local newVehicle newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) Resource 3 local vehicleParents = getElementsByType ("vehicleParent") -- getElementChildren doesn't work at this first line, because those elements are not direct children of the root element. for i=1 #vehicleParents do local vehicleParent = vehicleParents[i] local vehicles = getElementChildren ( vehicleParent, "vehicle" ) for j=1 #vehicles do local vehicle = vehicles[j] end end
-
Good question. Yes it will get all vehicles by default. There is one thing that I do not know and that is: "Will vehicles in a different dimension be considered as streamed in?" Because getElementsByType does have a setting that allows the user to only collect streamed in vehicles. Which is incredible useful to improve the performance of the script. But if you need all streamed out vehicles as well, it might not be a good solution. https://wiki.multitheftauto.com/wiki/GetElementsByType Syntax (clientside) table getElementsByType ( string theType, [ element startat=getRootElement(), bool streamedIn=false ] ) Capturing only streamed in vehicles. local vehicles = getElementsByType ("vehicle", root, true ) A different method, but has to be partly implemented on the resource that creates vehicles. (not recommended unless you know how to to work with the element tree) local vehicleParent = createElement("vehicleParent") local newVehicle newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) newVehicle = createVehicle ( 551, 0,0,0 ) setElementParent(newVehicle, vehicleParent) setElementDimension(vehicleParent, 100) -- move all current vehicles to a different dimension (fun fact) Getting only these 3 vehicles. local vehicles -- vehicles = getElementsByType ("vehicle", vehicleParent) -- or vehicles = getElementChildren ( vehicleParent, "vehicle" ) -- the difference: This function only captures the direct children of the parent 'vehicleParent'. But in this set-up it doesn't matter. Else you might need an utility function, like this: function filterElementsByDimension (elementList, dimension) local newElementList = {} for 1, #elementList do local element = elementList[i] if getElementDimension(element) == dimension then newElementList[#newElementList + 1] = element end end return newElementList end
-
Yes, just not by default. ---------- The website that originally contained the resource that could do that is gone because the owner crystalMV did quit MTA, but it seems a copy of it is still stored in the website archive: https://web.archive.org/web/20160507103732/http://crystalmv.net84.net/pages/scripts/server_coldata.php
-
Even after you received my warning, you are still continuing with bumping 2x. The content of those messages are not useful in anyway and very annoying for everybody, therefore I consider them as spam. https://forum.multitheftauto.com/topic/120659-help-stringfind/?do=findComment&comment=966942 https://forum.multitheftauto.com/topic/120659-help-stringfind/?do=findComment&comment=967139 Locked
-
How to make a Ped enter a Vehicle by getting close to it?
IIYAMA replied to Kraig Hellsing's topic in Scripting
I cleaned up your first function a bit. function reward(vehicle) if getElementType ( vehicle) == "vehicle" then local player = getVehicleOccupant(vehicle, 0) if player then givePlayerMoney(player, 1000) outputChatBox("Perp has been turned in and you earned $1000!", player, 0,255,0) destroyElement(source) -- destroy the marker, source of the event: addEventHandler("onMarkerHit", policem, reward) end end end function createPoliceMission () local policem = createMarker(1586,-1677,5, "cylinder", 5, 255, 0, 0, 170) addEventHandler("onMarkerHit", policem, reward) end createPoliceMission () -
If you do not understand the problem yet, how do you know that you need a function for repair? I understand that you are a new scripter, but not understanding the nature of the function you are trying to fix is not handy. The function is used to detect bugged accounts. Fix therefore the issue rather than the function that checks if issues occur.
