Dope88
Members-
Posts
30 -
Joined
-
Last visited
Everything posted by Dope88
-
Hello, I want to remodel my vehicles when the Players join on my server. Code works with the command but the game crashes with the onPlayerJoin Event. Thanks for Help server.lua: --[[resourceRoot = getResourceRootElement(getThisResource()) function fahrzeugErstellen(id) local fahrzeug = createVehicle(544, -1993.19, 209.32, 27.39 ) setElementModel(fahrzeug, id) --triggerClientEvent(resourceRoot, "fahrzeugAnfrage", resourceRoot, fahrzeug) end addEvent('fahrzeugErstellen', true) addEventHandler('fahrzeugErstellen', resourceRoot, fahrzeugErstellen) --fahrzeugErstellen()]] resourceRoot = getResourceRootElement(getThisResource()) fahrzeug = createVehicle(544, -1993.19, 209.32, 27.39) function fahrzeugErstellen(playerSource) triggerClientEvent('fahrzeugModellieren', resourceRoot, fahrzeug) end addCommandHandler('fahrzeugErstellen', fahrzeugErstellen) function onPlayerJoin(playerSource, commandName) setTimer ( function() executeCommandHandler ( "fahrzeugErstellen", playerSource ) end, 60000, 1 ) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin) client.lua: resourceRoot = getResourceRootElement(getThisResource()) function fahrzeugModellieren(fahrzeug) --if ( fileExists ( "pdBus.txd" ) then --if ( fileExists ( "pdBus.dff" ) then local txd = engineLoadTXD('pdBus.txd') local dff = engineLoadDFF('pdBus.dff') local id = engineRequestModel('vehicle', 544) engineImportTXD(txd, id) engineReplaceModel(dff, id) setElementModel(fahrzeug, id) --end --end end addEvent('fahrzeugModellieren', true) addEventHandler('fahrzeugModellieren', resourceRoot, fahrzeugModellieren)
-
Thank you that helped a lot Is there any function like guiGetSize() to get the Width and Height of an gui Element?
-
Hello, yes I know but i want to convert them in this script to absolute values
-
Hello I'am working on a gui system with absolute values: customKnopfErstellen = function(x, y, breite, laenge, ueberschrift, relative, parent) local knopfUntergrundOben = guiCreateStaticImage(x, y, breite, 1, "images/pixel_weiss.png", relative, parent) local knopfUntergrundRechts = guiCreateStaticImage(x+breite-1, y, 1, laenge, "images/pixel_weiss.png", relative, parent) local knopfUntergrundUnten = guiCreateStaticImage(x, y+laenge-1, breite, 1, "images/pixel_weiss.png", relative, parent) local knopfUntergrundLinks = guiCreateStaticImage(x, y, 1, laenge, "images/pixel_weiss.png", relative, parent) local knopfObergrund = guiCreateStaticImage(x+1, y+1, breite-2, laenge-2, "images/pixel_weiss.png", relative, parent) local label = guiCreateLabel(0, 0, breite-2, laenge-2, ueberschrift, relative, knopfObergrund) guiSetFont(label, "default-bold-small") guiLabelSetHorizontalAlign(label, "center", false) guiLabelSetVerticalAlign(label, "center", false) guiSetProperty(knopfUntergrundOben, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfUntergrundRechts, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfUntergrundUnten, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfUntergrundLinks, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfObergrund, "ImageColours", "tl:"..knopfFarbe.." tr:"..knopfFarbe.." bl:"..knopfFarbe.." br:"..knopfFarbe) addEventHandler("onClientMouseEnter", label, function(mx, my) guiSetProperty(knopfUntergrundOben, "ImageColours", "tl:"..knopfSchrift.." tr:"..knopfSchrift.." bl:"..knopfSchrift.." br:"..knopfSchrift) guiSetProperty(knopfUntergrundRechts, "ImageColours", "tl:"..knopfSchrift.." tr:"..knopfSchrift.." bl:"..knopfSchrift.." br:"..knopfSchrift) guiSetProperty(knopfUntergrundUnten, "ImageColours", "tl:"..knopfSchrift.." tr:"..knopfSchrift.." bl:"..knopfSchrift.." br:"..knopfSchrift) guiSetProperty(knopfUntergrundLinks, "ImageColours", "tl:"..knopfSchrift.." tr:"..knopfSchrift.." bl:"..knopfSchrift.." br:"..knopfSchrift) guiLabelSetColor(label, 135, 135, 135) end, false) addEventHandler("onClientMouseLeave", label, function() guiSetProperty(knopfUntergrundOben, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfUntergrundRechts, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfUntergrundUnten, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiSetProperty(knopfUntergrundLinks, "ImageColours", "tl:"..knopfRandFarbe.." tr:"..knopfRandFarbe.." bl:"..knopfRandFarbe.." br:"..knopfRandFarbe) guiLabelSetColor(label, 255, 255, 255) end, false) return label end standartKnopfErstellen = guiCreateButton guiCreateButton = customKnopfErstellen But how to make it when the values from guiCreateButton are relative values? How to convert them to absolute values that this script works? thank you
-
Wow! Thank you very much for taking the Time to help me with my Problem. I will take a look at it and try toedit it the next days. I will tell you when im done! Thank you!
-
I bought the Script from the Internet I‘ll look what I can do and could I message you in private please?
-
I made a Mistake with "bart" and "Bart" had the B big and b small but now I changed it and the face texture disappears when I activate the beard and the beard disappears when I activate the face texture..
-
Thanks for the Answer! I just set appendLayers to true but now nothing seems to happen. Client Side: local shaderData = [[ texture tex; technique replace { pass P0 { Texture[0] = tex; } } ]] face = {} bart = {} function addFace(thePlayer, ID, color) if (face[thePlayer]) then -- to remove any existing hair before applying new one. for i, v in ipairs(clothes_ID[7]["face"]) do engineRemoveShaderFromWorldTexture ( face[thePlayer], v, thePlayer) end local shader = dxCreateShader(shaderData, {}, 0, 0, false, "ped") local texture = dxCreateTexture("clothes/7/face/1/"..color..".png") dxSetShaderValue(shader, "tex", texture) engineApplyShaderToWorldTexture(shader,clothes_ID[7]["face"][tonumber(ID)],thePlayer, true) hat[thePlayer] = shader else local shader = dxCreateShader(shaderData, {}, 0, 0, false, "ped") local texture = dxCreateTexture("clothes/7/face/"..ID.."/"..color..".png") dxSetShaderValue(shader, "tex", texture) engineApplyShaderToWorldTexture(shader,clothes_ID[7]["face"][1],thePlayer, true) hat[thePlayer] = shader end end addEvent("client:sync:face", true) addEventHandler("client:sync:face", root, addFace) function addBart(thePlayer, ID, color) if (face[thePlayer]) then for i, v in ipairs(clothes_ID[7]["face"]) do engineRemoveShaderFromWorldTexture ( face[thePlayer], v, thePlayer) end local shader = dxCreateShader(shaderData, {}, 0, 0, false, "ped") local texture = dxCreateTexture("clothes/7/bart/1/"..color..".png") dxSetShaderValue(shader, "tex", texture) engineApplyShaderToWorldTexture(shader,clothes_ID[7]["face"][tonumber(ID)],thePlayer, true) hat[thePlayer] = shader else local shader = dxCreateShader(shaderData, {}, 0, 0, false, "ped") local texture = dxCreateTexture("clothes/7/bart/"..ID.."/"..color..".png") dxSetShaderValue(shader, "tex", texture) engineApplyShaderToWorldTexture(shader,clothes_ID[7]["face"][1],thePlayer, true) hat[thePlayer] = shader end end addEvent("client:sync:Bart", true) addEventHandler("client:sync:Bart", root, addBart) Server Side: function testface(thePlayer, _, ID, color) triggerClientEvent(root, "client:sync:face", thePlayer, thePlayer, ID, color) end addCommandHandler("testface", testface, false, false) function testbart(thePlayer, _, ID, color) triggerClientEvent(root, "client:sync:bart", thePlayer, thePlayer, ID, color) end addCommandHandler("testbart", testbart, false, false) Shared: clothes_ID = { [7] = { ["face"] = {"head_diff_000_a_whi"}, ["bart"] = {"head_diff_000_a_whi"}, }, }
-
Hello im searching a Model creator to edit my skin for a customization system I just need to cooy and paste the face region to put eyes eyebrows and beard. These textures fit perfectly with the normal face region but deletes the face when I activate a beard shader image for example. Thats why it must be duplicadet. I pay for the service
-
Hello I want to put multiple textures to one texture Name with "engineApplyShaderToWorldTexture", but when I apply one shader the other one disappears. What could I do now? Thanks for the help!
-
Give the Resource u running Admin rights in your acl
-
Hey Iam looking for a Model creator. Iam interested in MLO Maps like in FiveM. I want to have enterable buildings in San Fierro for example burger shots... I pay for your work. Thank you
-
Try this resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=14560
-
Hey im looking for a Clothing System. I will pay for it. PM me Thank you!
-
Works perfect Thank you
-
Do you know why?
-
Thank you I made all in Client File but now I get Errors in line 49: Corrupt DFF File data or file path too long
-
Thank you very much Do I just have to change infernus.dff and infernus.txd to my files? and what do I have to do with the key? (GT4BAE)
-
Hello im searching for a good compiler Script. I would also pay for it
-
Hello im searching for a good compiler Script. I would also pay for it
-
Download link doesnt work
- 28 replies
-
- 2
-
- trains
- not compiled
-
(and 2 more)
Tagged with: