-
Posts
43 -
Joined
-
Last visited
Everything posted by Majhol
-
kb_beer is the element I guess
-
this is the instruction attachElementToBone(element,ped,bone,x,y,z,rx,ry,rz) : attaches element to the bone of the ped. Server and client function. element : Element which you want to attach. ped : Ped or player which you want to attach element to. bone : Bone which you want to attach element to. x,y,z : Position offset from the bone. rx,ry,rz : Rotation offset from the bone. Returns true if element was successfully attached, false otherwise.
-
local pepsi = createObject( 955, 1463.5, -2206, 12.5, 0, 0, 0 ) local myMarker1 = createMarker( 1463.4791259766, -2207.4919433594, 13.546875, "cylinder", 1, 255, 255, 0, 170 ) function MarkerHit1( player, matchingDimension ) takePlayerMoney ( player, tonumber(150) ) setPedAnimation( player, "VENDING", "VEND_Drink_P", -1, true, false, true ) setTimer(function () setPedAnimation ( player, nil, nil) end,1300,1, true) outputChatBox( "لقد استعدت قوتك", player, 255, 0, 0 ) setPedRotation ( player, 0 ) setElementHealth ( player, 100 ) exports [ "bone_attach" ]:attachElementToBone(kb_beer,player,MarkerHit1,1463.541015625,-2207.1723632813,13.546875,0,0,0) end addEventHandler( "onMarkerHit", myMarker1, MarkerHit1 )
-
I used your code and it is on the bone_attach mod but still not working
-
can u guys help me in this attachElementToBone(kb_beer,player,MarkerHit1,1463.541015625,-2207.1723632813,13.546875,0,0,0) this is the code where it attach an object to the player I tried my best to do it I want it when it hit the marker they give him a beer in his hand but it is not working anybody can help me out?
-
guys how can iset a timer to it now It is working perfectly but he keeps drinking I want him to drink once
-
local pepsi= createObject(955, 1463.5, -2206, 12.5, 0, 0, 0) local marker= createMarker(1464.3000488281, -2208.1000976563, 13.5, "cylinder", 1, 255, 255, 255, 0) addEventHandler("onClientMarkerHit", marker, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker) ) then setPedAnimation(localplayer, "VEND_Drink_P ", "animation1") end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup) this is my new code but the object is not showing and it is not working can u help me out
-
can u help me in making it without getting aclgroup I used aclgroup because I I don't know other way to use it without getaclgroup can u now help me with making it without gettingaclgroup
-
Hi everybody I need help in making this script when they hit the marker the ped set the animation I guess I did everything but it's not working can anybody help me out this is my code local pepsi= createObject(955, 1463.5, -2206, 12.5, 0, 0, 0) local marker= createMarker(1464.3000488281, -2208.1000976563, 13.5, "cylinder", 1, 255, 255, 255, 0) function givePepsi () local Everyoneusergroup = getAccountName(getPlayerAccount(psource)) if isObjectInACLGroup("user."..Everyoneusergroup, aclGetGroup("Everyone")) then setPedAnimation(localplayer, "VEND_Drink_P ", "animation1") end end addEventHandler("onMarkerHit", marker, givePepsi) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup) meta.xml "B7raani" type="script" version="1.1.0" />
-
blawee thanks much it's working! tyvm!!!!!!!!!!!
-
its not working I used your code and this is my meta.xml is there something wrong?
-
this is what I reached to can u help me in it? addEventHandler("onClientResourceStart", resourceRoot, function guiToggleVisible ( ) if ( guiGetVisible ( myWindow ) == true ) then -- check if the gui element is visible guiSetVisible ( myWindow, false ) -- if it is, we hide it else guiSetVisible ( myWindow, true ) -- if not, we make it visible end end myWindow = GUIEditor.window[1] = guiCreateWindow(166, 96, 545, 402, "", false) myWindow = guiWindowSetSizable(GUIEditor.window[1], false) myWindow = GUIEditor.staticimage[1] = guiCreateStaticImage(16, 31, 152, 127, ":images/banshee.png", false, GUIEditor.window[1]) myWindow = GUIEditor.staticimage[2] = guiCreateStaticImage(13, 218, 155, 143, ":images/infernus.png", false, GUIEditor.window[1]) myWindow = GUIEditor.staticimage[3] = guiCreateStaticImage(206, 33, 151, 125, ":images/monster.png", false, GUIEditor.window[1]) myWindow = GUIEditor.staticimage[4] = guiCreateStaticImage(207, 222, 150, 139, ":images/cheetah.png", false, GUIEditor.window[1]) myWindow = GUIEditor.staticimage[5] = guiCreateStaticImage(396, 34, 130, 124, ":images/bullet.png", false, GUIEditor.window[1]) myWindow = GUIEditor.staticimage[6] = guiCreateStaticImage(395, 219, 131, 142, ":images/supergt.png", false, GUIEditor.window[1]) end ) bindKey ( source, "F3", "down", guiToggleVisible )
-
hi everybody I was wondering how can I bind a key to open a gui for example I wanna use F3 to open my gui and this is the gui code addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(166, 96, 545, 402, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.staticimage[1] = guiCreateStaticImage(16, 31, 152, 127, ":images/banshee.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(13, 218, 155, 143, ":images/infernus.png", false, GUIEditor.window[1]) GUIEditor.staticimage[3] = guiCreateStaticImage(206, 33, 151, 125, ":images/monster.png", false, GUIEditor.window[1]) GUIEditor.staticimage[4] = guiCreateStaticImage(207, 222, 150, 139, ":images/cheetah.png", false, GUIEditor.window[1]) GUIEditor.staticimage[5] = guiCreateStaticImage(396, 34, 130, 124, ":images/bullet.png", false, GUIEditor.window[1]) GUIEditor.staticimage[6] = guiCreateStaticImage(395, 219, 131, 142, ":images/supergt.png", false, GUIEditor.window[1]) end ) meta.xml <meta> <info author="Majhol" type="script" version="1.0.0" /> <script src="client.lua" type="client" /> </meta> I wish you can help me and thanks
-
i need a second help please this is the code i made until now but i want when a player goes to a the first marker in the code they tell him you started the mission and go to tires marker and start it and its a solo mission for him so everyone gets a mission not a one do it and everybody cant because its being used or the tires already has been placed function starting(hitElement) markermis = createMarker( 1386.9837646484, -2198.814453125,13.539070129395, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onMarkerHit", markermis, starting) marker = createMarker( 1604.2556152344, -2103.8518066406,18.375532150269, "cylinder", 1.5, 255, 255, 0, 170 ) marker2 = createMarker( 1602.9509277344, -2101.3615722656,18.388305664063, "cylinder", 1.5, 255, 255, 0, 170 ) marker3= createMarker( 1601.5798339844, -2099.2612304688,18.38455581665, "cylinder", 1.5, 255, 255, 0, 170 ) marker4 = createMarker( 1599.4366455078, -2096.0415039063,18.547512054443, "cylinder", 1.5, 255, 255, 0, 170 ) marker5 = createMarker( 1597.3601074219, -2092.8112792969,18.382898330688, "cylinder", 1.5, 255, 255, 0, 170 ) marker6 = createMarker( 1595.8270263672, -2090.4262695313,18.387573242188, "cylinder", 1.5, 255, 255, 0, 170 ) marker7 = createMarker( 1594.3381347656, -2088.1101074219,18.380485534668, "cylinder", 1.5, 255, 255, 0, 170 ) marker8 = createMarker( 1592.6345214844, -2085.4599609375,18.381044387817, "cylinder", 1.5, 255, 255, 0, 170 ) function createTire(hitElement) createObject (1327, 1605.4929199219, -2103.1025390625,18.465118408203, 180, 90, 9 ) end function createTire2(hitElement) createObject (1327, 1604.0155029297, -2100.4104003906,18.471321105957, 180, 90, 9 ) end function createTire3(hitElement) createObject (1327, 1602.9553222656, -2098.3054199219,18.490489959717, 180, 90, 9 ) end function createTire4(hitElement) createObject (1327, 1600.9392089844, -2095.1721191406,18.659139633179, 180, 90, 9 ) end function createTire5(hitElement) createObject (1327, 1598.955078125, -2092.0163574219,18.664535522461, 180, 90, 9 ) end function createTire6(hitElement) createObject (1327, 1597.4217529297, -2089.5693359375,18.506847381592, 180, 90, 9 ) end function createTire7(hitElement) createObject (1327, 1595.8522949219, -2087.0458984375,18.505527496338, 180, 90, 9 ) end function createTire8(hitElement) createObject (1327, 1594.3668212891, -2084.6303710938,18.509857177734, 180, 90, 9 ) end addEventHandler("onMarkerHit", marker, createTire) addEventHandler("onMarkerHit", marker2, createTire2) addEventHandler("onMarkerHit", marker3, createTire3) addEventHandler("onMarkerHit", marker4, createTire4) addEventHandler("onMarkerHit", marker5, createTire5) addEventHandler("onMarkerHit", marker6, createTire6) addEventHandler("onMarkerHit", marker7, createTire7) addEventHandler("onMarkerHit", marker8, createTire8) function emotion( player, matchingDimension ) setPedAnimation( player, "ped", "DAN_Down_A", -1, true, false, true ) setPedRotation ( player, 0 ) end addEventHandler("onMarkerHit", marker, emotion) addEventHandler("onMarkerHit", marker2, emotion) addEventHandler("onMarkerHit", marker3, emotion) addEventHandler("onMarkerHit", marker4, emotion) addEventHandler("onMarkerHit", marker5, emotion) addEventHandler("onMarkerHit", marker6, emotion) addEventHandler("onMarkerHit", marker7, emotion) addEventHandler("onMarkerHit", marker8, emotion) i wish you can help me and thanks
-
Hi All i just need a little help in making when a player hits the marker it create object i wish you can help me and thanks this is the code that i have reached to and can't complete it i wish i can get helped by u and thanks local marker = createMarker(2079.9399414063, 1007.7588500977,10.8203125, "cylinder", 10, 255, 255, 255, 0) function createTire(psource) createObject ( 2079.9399414063, 1007.7588500977,10.8203125, 90, 0, 0 ) setTimer(moveBack, 5000, 1) end end addEventHandler("onMarkerHit", marker, createTire)
-
Hi Everybody I Just Wanna ask each time im trying to open any map by clicking start in the admin panel nothing is happening so i tried that at F8 and when i typed start ...map an error comes saying : ...map was requested to start and idk what to do with it please help me if you can And Thanks
