-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
That is because you are not doing anything related to passing colours. Neither it is clear to me where those colours are.
-
Try to use an online tool to reconvert the font to True Type. It is probably containing some extra font information which MTA doesn't like.
-
local vehicle = getPedOccupiedVehicle( source ) local vehicle = getPedOccupiedVehicle( client )
-
Use client instead of source. (Line 5) Source is in this case the resourceRoot and not a player. And NO screaming TO ME! Or you get it 10x back.
-
Element data - Uses less data - Slow - Target players can't be specified. - Latent variant not available. Trigger event. - Uses much more data - Much faster - Target players can be specified.(data reduction) - Latent variant available. (Not blocking the network) To be honest, I prefer to use the latent trigger, even though it might be very annoying for players with slow internet. But it works for me best, because the players will not teleport so much.
-
Where does the code stops working?
-
Please give me some context about how it overlaps, it makes it easier for me to find the problem. self.endPos = self.startPos+self.maxItems Also this should be limited to the total items in the gridlist for performance reasons. (Unless you do add a grid) Debug the yOff variable for every item, just to be sure that the problem is here.(and show result)
-
triggerServerEvent("PonerCortina", resourceRoot, paintjobID) function Cortina1(paintjobID) local player = client -- ... triggerClientEvent (root, "setShader", resourceRoot, paintjobID) end addEvent("PonerCortina", true) addEventHandler("PonerCortina", resourceRoot, Cortina1) function addPaintjob2(paintjobID) end addEvent( "setShader", true ) addEventHandler( "setShader", resourceRoot, addPaintjob2 )
-
You can reduce data with sending only updates from the table instead of a copy of the table. As triggerEvents always reach their targets in order. So when they join, you send them the whole table and after that you send them only updates. <Tested> Using a single timer on serverside, will also help you to send multiple updates at once. If you use multiple timers then the amount of triggers will increase. A check rate of 150 ms would be fine. (but of course there will be only be triggers when there are updates) It might use more memory/cpu at the end, but it gives you the ability to reduce data and having your workflow starting from one function.
-
Reloading health happens when you are setting the health below 0. But the main issue is with the reduction of loss. Because with this code the health should never reach 0 in the first place. The loss can never be higher then the remaining health. Which means that if you have 1 health, the damage is 1000 but the loss will remain 1. If you reduce the loss with 50%. 1 health / 2 = 0.5 / 2 = 0.25 / 2 = 0.125 etc. Until mta thinks you are dead... And yes it can be a little bit buggy sometimes for an unknown reason, which doesn't happen really often if you write the code correct.
-
It clearly says that the truck isn't an element. Use the isElement function to check if the value of the elementdata is still an element. Because there are not elements saved in to the LUA memory. But reference to the elements are. Which means that if an element is the destroyed, the reference is not. So it keeps it's positive value. An if statement that only checks if the value is not or false will not work. This is the only way of validating elements that exist longer in-game. if isElement(variable) then
-
You will not find support for shampoo here. Since it is clearly something not related to MTA.
-
Yea, exactly. Except it is technically most of it in that way is not meant for Admins in the form of staff. Because you do want to remove those once you are finished. Too much debug isn't good for the performance as well as keeping overview. If you want to log things for staff Admin, then I recomment you to use https://wiki.multitheftauto.com/wiki/OutputServerLog Which will keep your debug information clean, so you can focus on real error.
-
If using a gui, use this to split: https://wiki.multitheftauto.com/wiki/Split And for using commands. The addCommandHandler function automatic splits arguments when passed over to the attached function. See examples: https://wiki.multitheftauto.com/wiki/AddCommandHandler
-
2 end's too much. One in both of the functions.
-
It needs to be a string and not a reference to a player. Use getPlayerName on the user data to get his name, which you can merge with the rest of the string.
-
`value` AND `val` are containing a nil value. They must contain a number value. If `value` contains a number value, it is all fixed. I can't help you any further than that with this code.
-
You can't move THIS debug console.
-
I apologies for my out of placed joke. But I am glad you figured it out with or without my help.
-
I am very sorry to say this, but your creativity skills are lower than zero... Because of the weed? Well here you are! Show me what you are made of! -- serverside addCommandHandler("checkPickups", function () local pickups = getElementsByType ( "pickup") for i=1, #pickups do local pickup = pickups[i] if getPickupType ( pickup ) == 2 then -- weapon pickup local respawnInterval = getPickupRespawnInterval ( pickup ) iprint("RespawnInterval:", respawnInterval) end end end)
-
I never said that you have to look at your debug console. The only thing I did, was give you a link which you can use to check what is going on with your pick-ups. Which is ALSO debugging. Make use of it, or smoke yourself and do not.
-
How about you debug it with this function? https://wiki.multitheftauto.com/wiki/GetPickupRespawnInterval
-
MY EYES HURT (A friendly advice to write it for your target audience)
- 2 replies
-
- 1
-
-
- map editor
- creative
-
(and 1 more)
Tagged with:
-
Maybe knowing the background of both sides will help you understand why that is. Serverside(code): Running on another computer/server (or application if hosted on the same pc). Clientside(code): Every player(his computer) is called a client. Between two sides there is something called ping. This it the communication delay between the client(your pc) and the server. You must have seen it in games. So if you are executing code clientside, other players will not see the result, because it is are only running on your machine. And if you are executing code serverside, other players will see the changes, because the server tells every player that something has changed. When you use a function serverside there there will be a delay before every client/player will see that something has changed. Which is related to the ping as well as to the internet speed. Also some client functions have the same result as serverside functions. Like setElementPosition or setElementRotation if you use them on a player. The player(you) are streaming your position/rotation to the server. So if you change your position clientside, the server will catch up slowly because of the streaming. But if you use these functions clientside on objects, other players will not see it changed, because objects aren't streamed like players are. Yet, I think serverside should always be in control of position and rotation because it might cause lagg or de-sync.
