-
Posts
6,062 -
Joined
-
Last visited
-
Days Won
208
Status Replies posted by IIYAMA
-
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?
-
I also added the remaining wait time, which is the finish touch for this useful function. It is very awkward that you only notice `that it was missing something` after using it yourself.
addCommandHandler("candy", function () local status, remainingTime = checkPassiveTimer("candy timer 2", true, 5000) if status then outputChatBox("YES, EAT!") else outputChatBox("NO CANDY FOR YOU! You will have to wait " .. math.ceil(remainingTime / 1000) .. " seconds.") end end)
-
-
Hello, could you help me? I am creating a punishment panel, but I am missing a set timer to kill punished players and return to normal. Could you help me?
-
Hey people, that some how get once again another super annoying pop-up...
I just wanted you to know that I kept my promise, project trains V2.0.0 is out with open source.
It took a little bit longer to clean up the old code, so `soon` was unfortunately not so soon. If you want to edit it, I have to apologies that I didn't clean up all the inconsistency within the code style. But never the less it has tabs and comments !
I wish you the best of luck in these crazy times!
-
@majqq Nice! Enjoy developing it!
It is probably in Russian language I assume?
-
-
Hey people, that some how get once again another super annoying pop-up...
I just wanted you to know that I kept my promise, project trains V2.0.0 is out with open source.
It took a little bit longer to clean up the old code, so `soon` was unfortunately not so soon. If you want to edit it, I have to apologies that I didn't clean up all the inconsistency within the code style. But never the less it has tabs and comments !
I wish you the best of luck in these crazy times!
-
@majqq thx!
What kind of server are you creating?
-
-
Lol, I am the old founder of fts.
Anyway, I sad I don't help bcs I don't play mta, just wanted to release our MGM for other servers. If it's not allowed then I just don't release it.
Have a nice day.
-
I am here to make sure, that:
- The forum stays clean of leaked resources.
- People do not download unwanted stuff of suspicious links.
Even if that is not the case with you. Which I have no knowledge of.
You know just as well as me that it is not OKE, to break a lot of the section rules because you think your content is more important than the section itself.
QuoteIf it's not allowed then I just don't release it.
My life doesn't depends on it.
Have a nice day.
-
-
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
QuoteThank 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 -
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
QuoteThank 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 -
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Pff, so many attemps, without searching for logic.
But yes this is the command:
/setPointJob pj1.png
- Make sure you are inside of the vehicle.
- Make sure you applied the GTA paintjob 1 upgrade on your vehicle.
Which is probably this one:
elegy1body256
And if it still doesn't work. Add some outputChatbox's in the code so that I know which part/line doesn't work of the code.
-
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
I edited the code a bit, but not finished it for 100%. As that is not my purpose.
But this should you give you a direction.
The code is untested, your job to test it as well.
If there are any errors/warnings with the current state, feel free to ask advice about those.
--[[ @Name Custom paintjobs | Elegy @Description Finally they're here ! Custom paintjobs (1-3),you can easyli change them in 'paintjobs' folder simply replace pj1,pj2,pj3 with new ones ! ;) @Premissions You are allowed to modyfi this script widhout my premission,but you aren't allowed that you did it ! @Owner mR|Monster --]]-- local paintjobAccessPoint = {} do local paintjobImportList = { {fileName = "pj1.png"}, {fileName = "pj2.png"}, {fileName = "pj3.png"} } for i=1, #paintjobImportList do local paintJob = paintjobImportList[i] local shader = dxCreateShader ( "texture.fx" ) local texture = dxCreateTexture ( "paintjobs/" .. paintJob.fileName) paintJob.texture = texture paintJob.shader = shader dxSetShaderValue ( shader, "gTexture", texture ) paintjobAccessPoint[paintJob.fileName] = paintJob end end addCommandHandler("setPointJob", function (cmd, fileName) if fileName and paintjobAccessPoint[fileName] then local theVehicle = getPedOccupiedVehicle ( localPlayer ) if theVehicle then --[[ You need to write here a cleanup here * https://wiki.multitheftauto.com/wiki/EngineRemoveShaderFromWorldTexture ]] engineApplyShaderToWorldTexture ( paintjobAccessPoint[fileName].shader, "elegy1body256", theVehicle ) end end end)
-
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...
-
Hello friend, sorry my English is bad.
please help paintjob you help me?....
thanks...