-
Posts
731 -
Joined
-
Last visited
-
Days Won
2
Reputation Activity
-
koragg reacted to IIYAMA for a status update, I have added a useful function to the wiki, for positioning dx-effects: https://wiki.
I have added a useful function to the wiki, for positioning dx-effects:
https://wiki.multitheftauto.com/wiki/GetScreenStartPositionFromBox
Enjoy! ?
-
koragg reacted to IIYAMA for a status update, WIKI Yesterday I added my first wiki page. Which is not necessary something you call
WIKI
Yesterday I added my first wiki page. Which is not necessary something you call 'news'. But it was a lot of fun figuring out how the interface actually works. It is to be honest not very beginner friendly, even though there is a lot of documentation added. documentation
The page/function which I added to the useful functions list:
https://wiki.multitheftauto.com/wiki/CheckPassiveTimer
This useful function allows you to use passive timers in your conditions. For example you want to prevent players repeatedly using a command.
I named the function 'checkPassiveTimer', not sure if that is the best name for it, since it it does SET, CHECK and UPDATE, (+ Clean up cycle), depending on the situation. Checking is what you expect it actually does, so I picked that one.
addCommandHandler("candy", function (player) if checkPassiveTimer("candy timer", player, 5000) then outputChatBox("YES, EAT!", player) else outputChatBox("NO CANDY FOR YOU!", player) end end)
Does anybody have any suggestions/idea's/?? Or more experience than me with the WIKI + suggestions or improvements for the format?
-
koragg reacted to IIYAMA for a status update, Hi there, what are you looking at? Ah this, I have uploaded V1.0.2 of the draw distan
Hi there, what are you looking at?
Ah this,
I have uploaded V1.0.2 of the draw distance resource. This resource helps with displaying objects that are normally streamed out. Your maps (even if you are not a mapper) will become a lot more beautiful!
Enjoy the resource as well as your well deserved WEEKEND!!!!
-
koragg reacted to IIYAMA for a status update, It took a while before I had time for explaining an enchantment which I created a whi
It took a while before I had time for explaining an enchantment which I created a while back, but I finally wrote a topic for it. Just another enchantment topic/tutorial. This time it is about communication between serverside and clientside.
The context of what will be enchanted
These 2 sides will have communication with each other:
serverside > code that runs in the server application.
Program Files (x86)\MTA San Andreas X.X\server\MTA Server(.exe)
clientside > code that runs on all clients/players > game application.
Program Files (x86)\MTA San Andreas X.X\Multi Theft Auto.exe
In most cases there is just 1 server.
And there might be more clients / players connected to that 1 server.
If you already know how client/server trigger events work, then it is still worth looking at. It is an enchantment, which means it does things for you, so less code is needed to achieve something complex.
There are some stupid jokes included, which are actually really bad... sorry. It is suppose reduce the cognitive load of the content by letting the reader first visualize the context before explaining it. (it is a method)
-
koragg reacted to IIYAMA for a status update, /\ / \ / \ / \ / \ ---------- For those who have already downloaded the tool I post.
/\ / \ / \ / \ / \ ----------
For those who have already downloaded the tool I post. I found and removed a critical bug in it, which had to do with calling back the client. While testing (alone) I didn't notice that it was sending information back to all clients instead of the one that should receive it. My apologies about this.
Change in the source code:
https://gitlab.com/IIYAMA12/mta-communication-enchantment/commit/c425481b5e49da3ff4aab9b5552795e2f2563e98
It is recommended to re-download the tool in that case.
NOTE: I will not make feature announcements here, only critical bugs.
Re-download
-
koragg reacted to IIYAMA for a status update, MTA-Communication-Enchantment It is finally far enough in development to share this w
MTA-Communication-Enchantment
It is finally far enough in development to share this with you. I made an announcement a few days ago about solving some struggles, that people have with communicating between the server and the client. Today is the day that it isn't just rumour, but for you to use.
Before I am going to write a topic for it, I prefer to solve any unknown issues first. That is where you guys might come in!
Just an example:(1)
Passing arguments like you used to@
--CLIENT callServer("passingArguments", "arg1", "arg2", "arg3") -- SERVER function passingArguments (arg1, arg2, arg3) outputChatBox(arg1 .. " " .. arg2 .. " " .. arg3, client) end
Just an example:(2)
Calling back!
-- CLIENT callServer( "calculation", 50, 100, function (value) outputChatBox("Value: " .. value) end )
-- SERVER function calculation (value1, value2) return value1 + value2 end
Just an example:(3)
Calling before a client has loaded his scripts!
--SERVER addEventHandler("onPlayerJoin", root, function () callClientAwait(source, "testCallClientAwait") end)
-- CLIENT function testCallClientAwait () outputChatBox("Yes this works!") end
Thank you @Xwad and @JeViCo for early testing!
Repository: (+ download)
https://gitlab.com/IIYAMA12/mta-communication-enchantment
[NOTE] The documentation on the repository is not 100% complete.
Direct download link:
[NOTE] On the repository there is syntax highlight
https://gitlab.com/IIYAMA12/mta-communication-enchantment/-/archive/master/mta-communication-enchantment-master.zip
-
-
koragg got a reaction from IIYAMA for a status update, Love how you talk to noobs not willing to learn man
Love how you talk to noobs not willing to learn man
-
koragg reacted to IIYAMA for a status update, Using one addEventHandler on a group of elements? Answer: local group = createElement
Using one addEventHandler on a group of elements?
Answer:
local group = createElement("groupMyCutePeds") -- Create a custom element and save it in to the variable <group>. -- Create 3 peds. local ped1 = createPed(120, 5540.6654, 1020.55122, 1240.545) local ped2 = createPed(120, 5541.6654, 1021.55122, 1240.545) local ped3 = createPed(120, 5542.6654, 1022.55122, 1240.545) -- Set the parent of the 3 peds. setElementParent(ped1, group) setElementParent(ped2, group) setElementParent(ped3, group) -- Add an addEventHandler and use the <group> as <attachedTo> element. addEventHandler("onPedWasted", group, -- "onPedWasted" = serverside. "onClientPedWasted" = clientside. function () outputChatBox("One of my cute peds just died. ;'( No exceptions!") end) (untested muhahaha :D)
-
koragg reacted to NeXuS™ for a status update, Back from my vacation, lets go.
Back from my vacation, lets go.
-
koragg reacted to Simple0x47 for a status update, MTA is like a drug, it's hard to exit from it.
MTA is like a drug, it's hard to exit from it.
-
koragg reacted to Simple0x47 for a status update, Game developing here I'm coming!
Game developing here I'm coming!
