-
Posts
4,121 -
Joined
-
Last visited
-
Days Won
2
Posts posted by Kenix
-
-
Keep it up man.
- 1
-
local text = guiGetText( yourGuiElement ); if ( text:find( "@" ) ) then outputChatBox( "contains @" ); else outputChatBox( "contains none " ); end
Also you can use pregMatch functions.
UPD:
http://Lua-users.org/wiki/PatternsTutorial
http://www.Lua.org/manual/5.1/manual.html#5.4.1- 1
-
Можно через вращение компонентов либо замены другого транспорта SWAT например или пожарной машины, у них есть крутящаяся турель.
https://wiki.multitheftauto.com/wiki/SetVehicleComponentRotation
https://wiki.multitheftauto.com/wiki/SetVehicleComponentPosition -
- Popular Post
- Popular Post
Hi everyone, a long time ago (novermber 2018) i started making new project called MTA Racing.
This project has an own unique atmosphere legendary games such as: NFS Underground 1/2 + Midnight Club games series by Rockstar games. I am a big fun of it and we started implement it, but this project has status abandoned in april 2019. But right now i decided to finish it in free time. Now i gonna tell you more info about this.
Features:- Custom mapping around Los Santos, 70% remake.
- Custom race tracks.
Tuning:
- Spoilers
- Front/Rear/Side bumbers
- Neon
- Lights
- Windows tinting
Race modes:
- Circluit
- Sprint
- URL
- Speedtrap
- Top Time
- Drift
- Street-X
- Drag
Vehicles:
- BMW M3
- Camaro SS
- Audi TT
- Mercedes AMG
- Subaru Impreza
- Lexus IS 300
- Nissan Skyline R34
- Toyota Supra
- Mitsubishi Lancer Evo X
- Dodge Viper 2018
- Lamborghini Huracan
- Mercedes E63
- Audi R8
Custom OST: 60+ songs (via stream)
Languages (You can send me your language and i gonna add it)- Russian
- English
Now i gonna show you some screenshots:
Open beta test:
IP: mtasa://51.75.147.186:22003Groups:
VK: https://vk.com/mta_race
Facebook: http://fb.com/mtarace
Discord: https://discord.gg/tKZtZWK- 3
- 2
-
It's private. I need test it more properly before adding pull request.
-
I implemented it in another project. Changing ColModels/Building limits working perfectly with MTA. But i don't tested it with engine functions.
- 1
-
Hi everyone.
I just wanna present my script called "radar-merger".
I made this script for another project. It uses node js and "combine-tiles" package. It merge every tile .png file into one combined file in gta:sa radar format.
Here is GitHub link to project + instruction.
GitHub: https://github.com/Kenix157/gta-radar-merger- 1
-
3 hours ago, IIYAMA said:
Agree, didn't thought about that one, but the counting up loop would still have the issue of skipping one(or more > context) of the items for that frame. The loop doesn't take into account that the index should stop increasing when an item is removed, as the array is collapsing.
Would this not cover all the issues?
local i = 1repeat if a[ i ] == func then table.remove( a, i ) else i = i + 1 enduntil not a[ i ]
I think it's good solution. Code updated.
-
On 19/05/2019 at 14:24, IIYAMA said:
If the loop isn't invert, this will not work well:
-- This will go wrongfunction theFunction () -- first function removeRenderEvent(theFunction)endaddRenderEvent(theFunction)-- add multiple functions, else the context isn't validfor i=1, 9 do addRenderEvent(function () end)end
functions:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Looping: from 1 t/m 10
| = index
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Deleting 1 during the loop:
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10Going on:
| > > > > > > > >
2, 3, 4, 5, 6, 7, 8, 9, 10, nothing
error:
|
2, 3, 4, 5, 6, 7, 8, 9, 10, nothing
If the loop is inverted, the loop will not have problems when items are removed.
@IIYAMA It cause another problem with render events, it starts call from end (which is not needed to us, because dx render events has "layers" and you need to call from 1 to table lenght)If you're using table.remove function, everything should work fine after remove item from table.
Let me explain:local a = {}; local func = function() end; a[ #a + 1 ] = func; for i = 1, #a do if a[ i ] == func then table.remove( a, i ); end end print( #( a ) ); -- 0
table.remove safely remove item from table, it's not contains a [1] index with nil value, it's clear
Proof:local a = {}; local func = function() end; a[ #a + 1 ] = func; for i = 1, #a do if a[ i ] == func then table.remove( a, i ); end end print( #( a ) ); -- 0 local func = function() end; a[ #a + 1 ] = func; print( #( a ) ); -- 1
Another example:
local a = { 1, 2 }; local func = function() end; a[ #a + 1 ] = func; for i = 1, #a do if a[ i ] == func then table.remove( a, i ); end end print( #( a ) ); -- 2 local func = function() end; a[ #a + 1 ] = func; for i = 1, #a do if a[ i ] == func then table.remove( a, i ); end end print( #( a ) ); -- 2
And finally (shows how another items is reordered): from { [1] = 1, [2] = func, [3] = 2} -> {[1] = 1, [2] = 2}
local func = function() end; local a = { 1, func, 2 }; print( "before", #a ); -- 3 for i = 1, #a do if a[ i ] == func then table.remove( a, i ); end end print( "after", #a ); -- 2
test here: https://www.Lua.org/cgi-bin/demo
-
15 hours ago, ccw said:
The net.so (referenced in the dump file) is not the one from https://nightly.multitheftauto.com/multitheftauto_linux_x64-1.5.6-rc-16569.tar.gz
Where did you get it?
Problem resolved. Thank you so much. (incorrect net module throw the problem, maybe old version idk)
-
I just run after compile
./linux-install-data.sh
-
What can i try? any suggestions
-
5 hours ago, ccw said:
Has the source been modified?
No, original from github
-
VM: Virtual Box
Error name: Segmentation fault
OS: Debian 9.9 (x64)
RAM: 1.7GB
CPU: 2
Version: MTA version r16569 (stable) (failed in another versions HEAD/etc)
Additional: i had the same error using Docker with "ubuntu" image.
Task: Just need to compile a custom MTA server.================
Debian 9.9 (compile MTA SA r16569)
gcc version:
6.3.0-18+deb9u1Dump log:
https://pastebin.com/itVUvLWQBacktrace (using gdb mta-server64):
https://pastebin.com/acSvH4BUDump:
https://upload.mtasa.com/u/974313768/server_1.5.6-custom_20190503_1231.dmp_================
Debian 8.11 (compile MTA SA r16569)gcc version:
4.9.2-10+deb8u2Dump log:
https://pastebin.com/DyPJxPC9Backtrace:
https://pastebin.com/utxwMndeDump:
https://upload.mtasa.com/u/287394891/server_1.5.6-custom_20190503_1611.dmp_================
Debian 9.9 (compile MTA SA HEAD)gcc 7.4.0.9 (updated)
Dump log:
https://pastebin.com/4CNAAW1VBacktrace:
https://pastebin.com/LrResDcrDump:
https://upload.mtasa.com/u/218452296/server_1.5.6-custom_20190503_1814.dmp_
UPD: Stable version r16569 (from linux.multitheftauto.com) works well. This error affects only on self-compiled version.UPD2:
starting mta-server64 with -n flag doesn't help. -
- Popular Post
- Popular Post
Link:
http://www.lua.org/gems/sample.pdf
I think it should be useful for everyone.- 2
- 2
-
-
Надо камеру за пределы СА переместить во время замены моделей.
Тут можно увидеть пример:
https://wiki.multitheftauto.com/wiki/EngineReplaceModel_notes- 1
-
Почта обновлена.
-
Используйте interpolateBetween либо Lerp (ищите в интернете реализацию).
-
Ну дак ты создаешь машину перед тем как проверить на наличия (аккаунта в acl.xml) в группе админа.
Нужно проверять на наличие в группе ДО создания машины. -
setElementData привязан к элементу, очищать не нужно.
Хотя если setElementData использовать на root, тогда нужно вручную удалять. (Сохраняется дата, даже если перезапустить ресурс) -
Портал Gamevs это игровые проекты:
- RP BOX
- MTA Oblivion Lost
- GTA Race
- и многие другие
Нам требуются Lua скриптеры.
Опыт работы в сфере MTA:SA будет большим плюсом.
Зарплата выше средней по рынку, определится по результатам собеседования.
В теме письма укажите "Работа".
Мы также приглашаем к сотрудничеству различные проекты. В теме письма укажите "Сотрудничество".Ваши резюме отправляйте на почту (UPD: 08.01.19):
[email protected]Желаем вам удачи на собеседовании!
- 2
-
-
handling
in Скриптинг
Posted · Edited by Kenix
https://wiki.multitheftauto.com/wiki/SetVehicleHandling
driveType: 'rwd', 'fwd' или 'awd'.