-
Posts
605 -
Joined
-
Last visited
-
Days Won
1
Everything posted by JeViCo
-
Thank you guys, both options work perfect. My vehicle element was driving through the marker and this caused the problem. I used setElementFrozen function to fix it
-
Hello there. I've recently tried to change vehicle's interior server-side and met a problem. My current code: -- client triggerServerEvent("teleporter", localPlayer, {10, 10, 2}, 1, math.random(65000)) -- server addEvent("teleporter", true) addEventHandler("teleporter", root, function(pos, int, dim) local x, y, z = unpack(pos) setElementInterior(source, int, x, y, z) setElementDimension(source, dim) end) Everything works perfect except for setElementInterior function. Interior changes, however coordinates are not. By the way, player in vehicle (driver). Any ideas?
-
@Tut's idea is specific and interesting. It may solve a possible problem in future. I'll try both ideas. Thank you guys
-
Actually it's not that bad. You gave me an idea which solved my problem without all of that problematic stuff That's a quite simple and smart solution, thank you
-
So contentMessages[line] is nil so line variable is nil as well try to find destroyLine function call in your code
-
Hi, @DogukanUcan, your screenshot doesn't work anymore. Could you reupload it so we can help you
-
@Zcraks you can replace passwordVerify function by comparing two hashes, for example: register: local hashedPassword = passwordHash("your_password","bcrypt",{}) setAccountData(account, "hash_password", hashedPassword) -- save it login: local currentHashedPassword = passwordHash("i_have_recently_typed_it","bcrypt",{}) local originalHashedPassword = getAccountData(account, "hash_password") if (currentHashedPassword == originalHashedPassword) then -- do something end I guess something wrong with your variables or case sensetivity in your password
-
Another way (using acl.xml rights): <right name="command.login" access="false"></right> <right name="command.register" access="false"></right>
-
Hello everyone! Can spawn stock wheel object for each custom vehicle somehow? Stock wheel's upgrade id is 0 so i can't do anything with this
-
Oops, missread a little bit. afk system is a bit more complex than you think. You should track player's movement to make sure that he is just standing and doing nothing. You should also use onPlayerLogin event to optimise your script (I'm 100% sure that your login-panel appears at the end of downloading & loading)
-
The first error (Expected vector3 at argument 4, got none) Line 99: dis2 = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) so variable x2 equals to none. You got x2, y2 and z2 variables right here: local x2, y2, z2 = getElementPosition(gates[key]["gate"]) So the problem is in your gates table A little advice: On the previous step you're making a loop: for key, value in ipairs(gates) do and you can replace gates[key]["gate"] with value.gate or value["gate"] and get the same result The second error is caused by previous one as the dis2 variable has no value.
-
@Hugos, your problem was at the last argument of setTimer: I replaced 0 with 1 timesToExecute: The number of times you want the timer to execute, or 0 for infinite repetitions (wiki) --Client local Timer = setTimer(function() if not isTransferBoxActive() then triggerServerEvent("PlayerKick", localPlayer) -- getLocalPlayer() and localPlayer returns player end end, 300000, 1)
-
@ODutii, you're checking player's health right here getElementHealth(player) >= 301 you might also need to check seats: function broken(player, seat) if seat == 0 then -- driver if getElementHealth(source) > 300 then setVehicleEngineState(source, true) else setVehicleEngineState(source, false) end end end addEventHandler("onVehicleEnter", root,broken) Source (wiki) The source of this event is the vehicle that was entered.
-
@Skander Dridi, download 1.0 US version of gta_sa executable from web and replace with installed one
-
That's a quite complex task. You should add models via vehicle components and manage them in future however there might be a problem with active parts such as doors and wheels. You'll need additional scripts to make your custom wheels, doors trunks etc.
-
Как отключить лимит денег? How to off money limit?
JeViCo replied to Military Guy's topic in Russian / Русский
@[M]Province, никак - это ограничение от SA. Самым простым способом является создание собственного хранилища (таблицы/elementData в обвязке с xml/mysql или accountData) -
@Tokio, make sure that you have enough memory to create a new font To see if creation is likely to fail, use dxGetStatus. (When VideoMemoryFreeForMTA is zero, failure is guaranteed.) (c) Wiki You can check it using dxSetTestMode function or with the following code below local st = dxGetStatus() print("Memory: "..(st.VideoMemoryFreeForMTA).."/"..(st.VideoCardRAM).." MB.")
-
nothing can protect your resources except for modules or some magic tricks
-
it seems working. Thank you! You saved my time
-
Hi guys! I've recently tried to change file client-side however i got none. meta.xml: <meta> <script src="client.Lua" type="client" /> <file src="testfile.txt" /> </meta> testfile.txt (server-side): sometext here client.Lua: local file = fileOpen('testfile.txt') fileClear(file) -- clear file local content = 'some new text' fileWrite(file, content) print(#content) -- got 13 print(#fileRead(file, fileGetSize(file))) -- always get 0 fileClose(file) acl.xml has resource.* permission and debug doesn't give any hints any ideas?? i used this function (same happens if a recreate file)
-
Well, i understood a little bit id = 429 local txd = EngineTXD:create('banshee.txd', true) EngineTXD:import(txd, id) however i keep getting the same error: expected string at argument 1 got table What am i doing wrong?
-
Hi there! I've recently found this page on wiki. This might be a stupid question but how do i use it? ?
-
@Zcraks you can also use this local screX, screY = guiGetScreenSize() local px,py = 1366,768 -- your resolution where everything fits perfect local x,y = (screX/px), (screY/py) simple example: dxDrawText('Hello guys!', x*450, y*300, x*300, y*100) OR you can make it happen for everything on one go by replacing the original function. Example: function all_dxDrawText(...) local arr = {...} -- get arguments arr[1] = x*arr[1] -- do some magic stuff arr[2] = y*arr[2] arr[3] = x*arr[3] arr[4] = y*arr[4] return dxDrawText(unpack(arr)) -- use modified arguments end all_dxDrawText('Hello guys!', x*450, y*300, x*300, y*100)
-
Hello there >3 I have recetly tried to add to execute sounds in different ways: PlaySoundA("C:\\sound\\test.mp3", NULL, SND_FILENAME); // SND_FILENAME or SND_LOOP and mciSendString("open \"C:\\sound\\test.mp3\" type mpegvideo alias mp3", NULL, 0, NULL); and any other additional librarias but got nothing. I admit that i doesn't know much and test this stuff for first time Anyway, how can i make looped music in main menu or make some audio effects on menu interaction? Sry for my bad english =D