-
Posts
636 -
Joined
-
Last visited
-
Days Won
6
Everything posted by HassoN
-
قاعد تقول انه يبين لو انت عطيته من لوحة الادمن !؟ يعني المود شغال زي العسل ، المشكلة من المود الثاني الي قاعد يعطيهم نيترو ، شكله ما يعطيهم اصلا
-
use onPlayerCommand check if the command is register then use cancelEvent().
-
Basically it should be something like: addEventHandler("onClientGUIClick", resourceRoot, function() if (source == closeButton) then -- replace closeButton with your button name. guiSetVisible(window, false) -- replace window with your window name. showCursor(false) end end) And next time check the examples on wiki before asking because most of the times the examples are really clear to understand.
-
Show me what you've done along with /debugscript 3.
-
You just add a normal button then name it "Close" Then you use addEventHandler -- onClientGUIClick guiSetVisible -- hide the GUI showCursor -- hide the cursor
-
marker = createMarker (1623.5999755859, 577.59997558594, 0.79999995231628, "cylinder", 1.2, 255, 0, 0, 140 ) function markerHit(plr) if (plr ~= localPlayer) then return false end guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEventHandler( "onClientMarkerHit", marker, markerHit) GUIEditor = { button = {}, window = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(448, 230, 504, 330, "Fisherman", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.85) guiSetVisible(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(7, 33, 222, 38, " Fisherman: Hello! Get some fish food!", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(10, 83, 105, 33, " x10 Food = 300$", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.button[1] = guiCreateButton(22, 133, 122, 80, " BUY FOODS(10)", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(283, 79, 192, 55, "Do you have enough fishes to sell?\n Let me have!", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(293, 33, 68, 20, " Fisherman:", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.button[2] = guiCreateButton(278, 134, 192, 73, " SELL FISHES", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(113, 266, 283, 18, " Note! You can buy maximum 20 foods for per deal", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(476, -28888, 18, 768, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(444, -31241, 30, 768, "", false, GUIEditor.window[1]) end )
-
You may still use server side to create the ped then cancel its damage in client side.
-
function PedLoad(ped) ped = createPed ( 36, 1623.5778808594, 576.61004638672, 1.7578125 ) setElementFrozen( ped, true ) addEventHandler("onClientPedDamage", ped, cancelEvent) end addEventHandler("onClientResourceStart", resourceRoot, PedLoad)
-
That will make all peds in the server immortal. You should use resourceRoot instead of getRootElement().
-
Remove the string. it must be ped not "ped".
-
It must work, the code is fine. Make sure that you've edited the correct file and refreshed/restarted the resource.
-
what's that ""balikci"" ? Use something like function pedLoad(balikci) ped = createPed ( 36, 1623.5778808594, 576.61004638672, 1.7578125 ) setElementFrozen( ped, true ) end addEventHandler("onResourceStart", getResourceRootElement(), pedLoad)
-
use setElementFrozen
-
It is perfectly fine. The code is good, your meta is good as well. It must work, check if you are in dimension 0 and interior 0 at the correct place of the ped.
-
Code seems fine. Try to use /debugscript 3 then restart the resource. Tell me if any error pops up.
-
Little example: local myXML = xmlCreateFile("test.xml", "loginInfo") local usernameNode = xmlCreateChild(myXML, "username") local passwordNode = xmlCreateChild(myXML, "password") xmlNodeSetValue(usernameNode, "HassoN") xmlNodeSetValue(passwordNode, "123") And here's your result: <loginInfo> <username>HassoN</username> <password>123</password> </loginInfo>
-
I'd recommend you to use xml functions. Once the player logs in, send a trigger to client side to create (if not created) a xml file, then add username + password to it. Next time player logs in, check if he has that file with the username + password, if yes, and your "Remember me" tickbox is activated, then put that text into your panel. Use: xmlLoadFile + xmlCreateFile -- load or create the xml file. xmlFindChild -- check if username and password exist xmlCreateChild -- if they do not exist, then create them. xmlNodeSetValue -- add the value of the player's password/username. -- and for loading the information you may use the same functions above. except xmlCreateChild and xmlNodeSetValue.
-
the 2nd argument of setElementCoollidableWith is an element not a table! use something like this instead: local objects = getElementsByType("object") for i, v in ipairs(objects) do setElementCollidableWith(source, v, false) -- i replaced projType with source because projType is a number while source is the element. end
-
Make it not collidable with objects using setElementCollidableWith Second option could be: setElementCollisionsEnabled -- disable collision with everything setElementCollidableWith -- enable it with vehicles But I'm not sure about the last method.
-
Try doing something with engineApplyShaderToWorldTexture check the example on wiki ^ Here's how it would look if you replace a shader on a vehicle: https://imgur.com/a/eAR6OPb
-
You can't replace only 1 vehicle model. You replace all vehicles with the same id model. However, there's shaders option to change only the texture of a certain vehicle.