-
Posts
467 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Gravestone
-
Trying to steal compiled client files, eh?
-
This is how the colors are chosen in the admin resource: <group action="mute" r="255" g="0" b="0"> <all>$player has been muted$by_admin_4all. $data2</all> <log>ADMIN: $admin has muted $player $data $data2</log> </group> I don't think this can be edited, or maybe you can remove this above code and add custom messages in the admin resource where the muting player action is triggered.
-
The message HurT muted HurT(2mins) is by default from the admin resource. You can create your own punishment system and output the text like you want it to be.
-
Why can't the weapons players have can be made an element too? The functions for custom weapons, can't they be used for player weapons too?
-
Maybe this can do the job?
-
UPDATES: - Combined multiple functions into one. - Fixed a bug where the opponent wasn't removed when the clan war stopped. - Added a feature to end the clan war when the players of a team quit and there were less than 3 players. Updated download link is in the main post.
-
If you're the owner of this code, then you'll obviously know how to fix it yourself.
-
The first point is obvious, I'm doing that. Second point, it replaces models successfully when the client downloads the files via a command. The weapon models are download so they have to be replace when the client re joins. Or the resource restarts. That's what I'm tried to do.
-
For making an object infront of them player I guess you'd need to make some calculations and for the second thing, what is sapling?
- 7 replies
-
- object put
- front
-
(and 2 more)
Tagged with:
-
The function will not work if it is not triggered. I need to replace models when the resource starts for the clients.
-
[HELP ME] Why not working toggle warp in freeroam?
Gravestone replied to Turbe$Z's topic in Scripting
function setWarpLocked(player) outputChatBox("Nem tudnak rád warpolni", source, r, g, b) setElementData(player, "IsWarpLocked", true) end addCommandHandler("warpki", setWarpLocked) function setWarpUnlocked(player) outputChatBox("Mostmár rád tudnak warpolni", source, r, g, b) setElementData(player, "IsWarpLocked", false) end addCommandHandler("warpbe", setWarpUnlocked) Use these functions ^ -
Help pls ?
-
This function is not being handled. Add an event handler to it or try this: function omg_plat1() plat1 = createObject(3095, 3052.1999511719, -973.59997558594, 1.6000000238419, 0, 0, 0) plat1Attach1 = createObject(3498, 3044, -973.40002441406, 1.5, 0, 90, 0) attachElements(plat1Attach1, plat1, -8.1999511719, 0.1999511718775, -0.1000000238419, 0, 90, 0) plat1Attach2 = createObject(3095, 3056.1999511719, -973.59997558594, -2.4000000953674, 0, 90, 0) attachElements(plat1Attach2, plat1, 3.999999999975, 2.5011104298756e-012, -4.0000001192093, 0, 90, 0) plat1Attach3 = createObject(3095, 3052.1999511719, -977.59997558594, -2.4000000953674, 90, 0, 0) attachElements(plat1Attach3, plat1, -2.5011104298756e-011, -3.9999999999975, -4.0000001192093, 90, 0, 0) plat1Attach4 = createObject(3095, 3052.1999511719, -969.59997558594, -2.4000000953674, 270, 0, 0) attachElements(plat1Attach4, plat1, -2.5011104298756e-011, 4.0000000000025, -4.0000001192093, -90, 0, 0) omgMoveplat1(1) end setTimer(omg_plat1, 1000, 1)
-
I'm trying to make a option for players to download mods. The files are downloaded but if I restart the resource or the player joins then it spams the debug with 'attempt to load '..file name..' before 'onClientFileDownloadComplete' event. Is there anyway I can prevent my debug from getting spammed? weapons= { { file = "335" }, { file = "346" }, { file = "347" }, { file = "348" }, { file = "349" }, { file = "350" }, { file = "351" }, { file = "352" }, { file = "353" }, { file = "355" }, { file = "356" }, { file = "357" }, { file = "358" }, { file = "359" }, { file = "360" }, { file = "362" }, { file = "363" }, { file = "372" }} function downloadComplete(file, success) if (source == getResourceRootElement(getThisResource())) then for index, weapon in pairs(weapons) do if file == "weapons/"..weapon.file..".txd" or file == "weapons/"..weapon.file..".dff" then setTimer(replaceModels, 1000, 1) end end end end addEventHandler("onClientFileDownloadComplete", root, downloadComplete) function replaceModels() for index, weapon in pairs(weapons) do if fileExists("weapons/"..weapon.file..".txd") and fileExists("weapons/"..weapon.file..".dff") then txd = engineLoadTXD("weapons/"..weapon.file..".txd") engineImportTXD(txd, weapon.file) dff = engineLoadDFF("weapons/"..weapon.file..".dff") engineReplaceModel(dff, weapon.file) else outputDebugString("Weapon file do not not exist for client "..getPlayerName(localPlayer)) end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), replaceModels)
-
Tell us what errors you're facing.
-
It's hard for me to read your code like this xd. Since you're new to the forums, you can post your code by clicking on the '<>' option in the taskbar and then select 'lua' and paste your code.
-
-
Need help with my script - outputChatBox flood problem
Gravestone replied to MaRcell's topic in Scripting
outputChatBox ('#FF5100* #ffffffVocê tem #FF510010 #ffffffsegundos parar voltar para o Carro.', source, 255, 255, 255, true) T11 = setTimer (destroyElement, 10000,1, blipxxx[source]) T22 = setTimer (destroyElement, 10000,1, cam[source]) T33 = setTimer (setElementData, 10000,1, source, "Trab", false) T44 = setTimer (function() Trabalho = false if getElementData(source, "Trab") then setPedSkin (source,0) outputChatBox ('#FF5100* #ffffffVocê ficou muito tempo fora do veiculo e fracasso a missao!.', source, 255, 255, 255, true) setElementData(source, "Trab", false) end end, 10000, 1) end end addEventHandler ("onVehicleExit", root, NSPode) function SNPode (source) if (cam[source]) and isElement(cam[source]) then killTimer (T11) killTimer (T22) killTimer (T33) killTimer (T44) end end addEventHandler ("onVehicleEnter", root, SNPode) Try this ^, not tested tho -
Thanks. Well, I don't know xd.
-
Explained in English and some other languages as well.
-
Let's make a cake and let you have the bigger piece, shall we?
-
Create a simple code with a command which sets your armor to the required amount.
-
Need help with my script - outputChatBox flood problem
Gravestone replied to MaRcell's topic in Scripting
Please use the new way to post lua code.