h4x7o0r
Members-
Posts
203 -
Joined
-
Last visited
Everything posted by h4x7o0r
-
Hey there . I've tried to change a lil bit this script : https://community.multitheftauto.com/index.php?p= ... ls&id=4472 (done by Al3grab) to work on with race_starter_pack. This resource keeps the money in elementdata so to make it work it needs some changes. I've done the part to add the prize to player's money but i don't know how can i save this to the database. The money is updated as long as i'm online. When i reconnect, it shows me the money that i've had before winning the prize. So i don;t know how to update the database table when someone's winning. Here's what i've done changed : function onPlayerWin(player) local money1 = tonumber(getElementData(player,"Money")) outputChatBox("* "..getPlayerName(player).." #FFFF00Has won the Prize #00FF00$"..thePrize,root,255,255,0,true) setElementData(player, "Money", money1+thePrize) givePlayerMoney(player,thePrize) executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'") removeCode() end I think my problem is at executeSQLUpdate. Thanks in advance guys.
-
As i know DKR it's already dead (just tell me if i'm wrong). They keep releasing patches but this problem still persists. I'm really curious if someone else tested this script (for about 30 min) and can tell me if it's crashing or not MTA. (I don't know but could be a .dff problem for some wheel model). Thank you for your reply guys.
-
It looks like the problem with crash still persists. I'm suspecting this resource because if I don't press "M" to activate the new wheels, everything's fine, no crash or other things like this. Very strange.
-
I've test it for 5 minutes and it's working very well. Thank you very much again Solidsnake14. I'll post the feedback (i'm curious if i'll still receive this MTA Crash like before. usually somewhere between 30-45 minutes of playing)
-
How can i use multiple txd's, dff's and other stuff like this using a single resource ? for example local enabled = false bindKey( "m","down", function( ) if not enabled then txd100 = engineLoadTXD("rims.txd", 1075) engineImportTXD(txd100, 1075) dff100 = engineLoadDFF("wheel_sr6.dff", 1073 ) engineReplaceModel(dff100, 1073) dff101 = engineLoadDFF("wheel_sr3.dff", 1074 ) engineReplaceModel(dff101, 1074) else destroyElement( txd100 ) destroyElement( dff100 ) destroyElement( dff101 ) end enabled = not enabled end ) if I wanna add 15 more dff's how can i group it or how can be modified (sometimes is giving me crash on server )?
-
To replace a TXD u need to have ID, paintjobs doesn't have any id.
-
Thank you very much man, it's working flawless now. I've had a strange problem that showed me double outputChat text when someone have been boomed from the server. I resolved that problem by removing the following lines from server.lua : elseif(mtype == 2) then outputChatBox(messageColor.."* You are AFK and you will be killed after 10 seconds!", source, 255,100,100, true) end
-
I've search in the "community" to find out an afk system for race gamemode and i found the resource done by Dr. Crazy (https://community.multitheftauto.com/index.php?p= ... ls&id=1283). The resource is working very well, only thing i wanna mention is that doesn't show the .png warning for player Here is the client side : local MaxAFKtime = 30 local warnTime = 20 local v = 0 local AFKtime = 0 local sx,sy = guiGetScreenSize() local wEvent = false function rWarn() dxDrawImage( sx/2 - 300, sy/2 - 100, 600, 200, 'warn.png' ) end function stopWarn() if(wEvent) then removeEventHandler("onClientRender", getRootElement(), rWarn) wEvent = false end end function checkMain() if isPedInVehicle ( getLocalPlayer() ) then v = getElementVelocity ( getPedOccupiedVehicle ( getLocalPlayer() ) ) if(v == 0) then aTimeAdd() else aTimeClear() end end end function aTimeAdd() AFKtime = AFKtime + 0.1 local isFinished = getElementData ( getLocalPlayer(), "race.finished") if(isVehicleFrozen ( getPedOccupiedVehicle ( getLocalPlayer() )) and isFinished == false) then aTimeClear() end if(AFKtime >= MaxAFKtime) then AFKtime = 0 triggerServerEvent ( "afkSlap", getLocalPlayer()) stopWarn() triggerServerEvent ( "afkWarn", getLocalPlayer(), 1) elseif(AFKtime == warnTime) then triggerServerEvent ( "afkWarn", getLocalPlayer(), 2) if(not wEvent) then addEventHandler("onClientRender", getRootElement(), rWarn) wEvent = true end end end function aTimeClear() AFKtime = 0 end setTimer ( checkMain, 100, -1) function onClientLoaded(res) triggerServerEvent("onClientLoaded",getLocalPlayer()) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),onClientLoaded) function loadSettings(maxtime, wtime ) MaxAFKtime = tonumber(maxtime) warnTime = tonumber(wtime) end addEvent( "onSettingsReady", true ) addEventHandler( "onSettingsReady", getRootElement(), loadSettings ) I've also used debugscript 3 and no error are shown. So, how can i fix this and how can i add a counter for seconds ? eg. You are afk. You will be destroyed in 10 sec (9,8...) Thank you guys.
-
Any ideas ? i really appreciate every info. Thank you in advance.
-
Thank you very much guys. JR10 variant is working very well. I really appreciate your help. PS. I've also added 2 outputChatBox to show the state (if it's enable or disable). As i know, txd/dff replacement can't be made without starting the next map. Is there any possibility that the change to be applied right after the button was pressed ? (i don't know, maybe the resource to be reloaded or something like this). Thank you again to all that helped me.
-
Thank you for reply guys. Solid's script it looks like it's working but when u restart the map 2 times it comes to default. for example : I wanna put this toggle for wheels (dff and txd). If I press "M" i need to restart the map .. to load new wheels. Same if i wanna roll back to the stock model. But when I start again that map it comes back to stock wheels Kenix - it says Bad argument @ destroy element. LE : I've just seen that it on solid's variant it says something like : Bad 'element' pointer @ at 'destroy element'(1)
-
Thank you for the reply. I've tried what u suggested but doesn't work.
-
I didn't want to start a new topic so i've edited this one. How can i modify this script to turn on/off some txd/dff (just like a toggle) ? For example: to use "M" to turn on / off road texture and model.
-
Cool now this archive it's working very well. Thank you for sharing. Btw it's the last version 0.1.7 for QT to Lua. Kewl.
-
For me the files inside the archive are corrupted. I've download it many times with different browsers and same.
-
Kewl , now the problem has been solved thanks to benox.exe. The method with "deniska script" works very well. Thank you again for all your help.
-
Hey all, i'm having a strange light problem. Every model i export so i can get ingame from 3dsm reacts to headlights in a strange manner, is there any way to disable that effect on export? Mention : I played a lot with the gta material, but no results. Any ideeas? Thanks in advance guys.
-
Like always Castillo to the rescue. Thank you very much man . It's working very well.
-
How can I set this to be active when the resource starts ?
-
Thank you SolidSnake14 for the script, now it's working very well. Thank you Benox.exe, i've also tried that.
-
I've tried to replace it but now it doesn't work anymore. No errors but not loaded. LE: This way ? addEventHandler("onClientResourceStart",getRootElement(), replace) addEventHandler("onClientMapStarting",getRootElement(), replace)
-
Thankyou for reply. U mean to replace onClientResourceStart with onClientMapStarting ?
-
I wanna change some txds and some dffs so i'm using the following script : replaceobjects.lua function replace () txd = engineLoadTXD ("vgncarshade1.txd") engineImportTXD(txd, 3458) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), replace) and meta.xml: <meta> <script src="replaceobjects.lua" type="client" /> <file src="vgncarshade1.txd" /> </meta> This is working very well but i have some problems with wheels. After the resource is starting, on some maps when the modified wheel is present it doesn't show my new wheel. If i'm restarting the map , the wheel is replaced with the new one. I think some maps have some "default" wheels loaded. Is there any way how can i force the server to show my new wheels when a new map is starting ? What should i modify for that ? Thanks in advance.
-
Thank you for your help but i'm 0 knowledge in gui, i've tried guieditor resource, but for the moment haven't got the point how it works
