-
Posts
605 -
Joined
-
Last visited
-
Days Won
1
Everything posted by JeViCo
-
[C++] Can i use MTA functions in modules?
JeViCo replied to JeViCo's topic in Open Source Contributors
Thanks =D I understand module mechanics a bit more now -
Hello there! So the question is in the title - am i able to use MTA functions somehow inside module code? Maybe i can link it somehow with MTA source code to avoid errors during compiling
-
@Vitlink you can do it using render targets: 1. Rotate image to make 3d effect 2. Draw it on render target to hide borders
-
solved. I was copying files to mta sa directory for no reason + some mfc libraries were missing.
-
bump
-
thank you for reply. I can't even launch MTA. It says that files and module versions are incorrect. Should i specify " i use custom client leave me alone" somewhere before compiling?
-
Hello everyone! I've recently tried to make custom client (i changed main menu elements, added c++ related functions) but i keep getting version errors. Is that even possible? Maybe i'm doing something wrong
-
В том то и проблема, что это не бот для канала, а standalone приложение, которым я могу воспользоваться только при помощи модулей, а не http запросов :с Вот как это осуществить я не совсем понимаю. Там используются функции вида модуль.функция, а на уме пока что такая картина (своего рода переход): function функция (...) return модуль.функция(...) end @IIYAMA thank you for your help but i have .dll module. I guess i should make my own methods as @Sorata_Kanda and @XaskeL have already mentioned I think i should do some kind of function transition but i don't know where to start
-
Thanks for reply! I tried that and got nothing. I think i can't use this function at all What do you mean? Custom functions? I don't understand modules much but i'm gonna do whatever it takes I tried to use discord RPC library (Lua) ( functions such as discordRPC.initialise where discordRPC = require("discord-rpc") )
-
Hi there! I have custom module for lua language (dll) which use require function to work example: local modul = require("my-module"); local variable = modul.func(some_args, another_stuff) Of course i added this module to mtaserver.conf to avoid require but i don't know how can i use that function from example (module.func) now.
-
@RootBey you can simply disable it with this code: addEventHandler("onClientKey", root, function(key) if key == "t" then cancelEvent() end end) OR (if you want to disable chat) you can use this code:
- 1 reply
-
- 1
-
-
@Knuck you can simply iterate through table function addXp(player, amount) local xp = getElementData(player, "XP") + amount -- move to new level for i, v in pairs (LEVELS) do if xp >= v then xp = v - xp -- if you need it ofc setElementData(player, "Level", xp) break end end setElementData(player, "XP", xp) end
-
@RangerMind you should use separate table for this action as @mehmet said you should use createColSprere + onClientColShapeHit to insert players into table and then remove them when onClientColShapeLeave event triggers. By using onClientChatMessage event you can filter messages and display them from players, who are in your table This method won't affect performance much
-
@XaskeL You can get a count of players using php (php sdk)
-
Ты можешь использовать setElementData/getElementData или таблицы/метатаблицы для использования данных в скрипте, но в твоём случае данные сохраняются в БД, поэтому пускай userdata - это наш игрок. Сразу в бд ты не сможешь запихнуть его - будет выдавать ошибку. Тебе понадобятся дополнительные данные, которые с этим игроком связаны, например великолепная функция getAccountID (получаешь id аккаунта, что логично) @Voter
-
onClientCursorMove (worldX, worldY, worldZ variables + some math stuff to move object in 1 axis) + moveObject or setElementPosition @Lezlike
-
just a 1 question. Did you use shaders only to do this ?)
-
I know about socket module that can manage with it. Also i can output mta messages on discord server using web hook, but can i do it in opposite direction? I mean can i output discord messages on mta server without additional modules?
-
please move it to russian server problems
-
thank you so much @IIYAMA i fixed my problem)
-
@majqq You can't interact with weapons directly. You should do it in common software like Zmodeller (dff) - easy way OR you can make invisible texture, create and attach custom weapon object to yourself using bone_attach functions, replace texture using shaders to make them visible again and manage it - hard way
-
Hi there! I've recently discovered 2 problems: 1. I can't trigger fetchRemote inside another fetchRemote function. Example: fetchRemote("http_stuff",function(resp) -- everything OK here -- some magic here myfunc("some_args") end) function myfunc(args) fetchRemote("httpStuff_x2",function(resp2) print("done x2") end) -- it won't trigger but i'll see 'done x2' message end 2. i can't store information into variables inside fetchRemote func. Example: local variable fetchRemote("http_stuff",function(resp) -- everything OK here variable = resp print(variable) -- OK end) print(variable) -- nil I don't know what to do ?
-
you probably should make your own 'layer'. For example some vehicles have "remap" texture
