Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. Make it relative and put the x,y pos here : local x,y = RelativeToAbsolute(x,y) And try !
  2. GUIEditor.label[1] = guiCreateLabel(277, 221, 111, 15, "'s Stats", false) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true) guiSetProperty(GUIEditor.label[1], "AlwaysOnTop", "True") addEventHandler("onClientRender",getRootElement(), function ( ) if ( guiGetVisible(GUIEditor.label[1]) == false ) then return end guiSetText(GUIEditor.label[1],""..getPlayerName(localPlayer).." ") end ) Try it not tested .. client ..
  3. حياكـ الله ذذ بـ التوفيق ..
  4. Show me the new problem | error?
  5. اممم فية خطأ؟ debugscript 3 بـ الكونسول وشوف مع اني متأكد انة المفترض يشتغل !
  6. dxDrawImage3D(xm,ym,zm,1,1,Image) تشوف zm سوي فيها + مثلا dxDrawImage3D(xm,ym,zm +2,1,1,Image) راح ترتفع و تشوف 1 ,1 هذي الارتفاع و العرض ! تقدر تغير و عشان تنقص تسوي - dxDrawImage3D(xm,ym,zm -1,1,1,Image) و جرب !
  7. لم يتم التجربة .. gate = createObject(980, 2127.099609375, 2848.599609375, 12.60000038147, 0, 0, 0 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. gatecol = createColCircle (2127.099609375,2848.599609375, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. function openagates ( thePlayer ) if ( getElementType ( thePlayer ) == "player" ) then local group = exports [ "gang_system" ]:getPlayerGang ( thePlayer ) if ( group == "Mando")then moveObject ( gate, 2000, 2127.1000976563, 2848.6000976563, 16.89999961853 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. else outputChatBox ( "Sorry You Must Be In Group [F.S] Leader Hobe", thePlayer ) end end end addEventHandler ( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function function closeagates(thePlayer) if ( getElementType ( thePlayer ) == "player" ) then local group = exports [ "gang_system" ]:getPlayerGang ( thePlayer ) if ( group == "Mando")then moveObject ( gate, 2000, 2127.099609375, 2848.599609375, 12.60000038147 ) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. end end end addEventHandler ( "onColShapeLeave", gatecol, closeagates ) --Event Handler to trigger the function سيرفر ..
  8. iPrestege

    help

    What is the problem?
  9. Hmm...are sure about the relative position ? You get it from the guieditor or from where?
  10. I Can't see the pictuer i don't know why try another upload site .
  11. createMarker "onMarkerHit" getElementType givePlayerMoney استخدم هذي الوظائف ..
  12. iPrestege

    help

    Try this : addEventHandler ( "onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then local x, y, z = getElementPosition ( theVehicle ) local rx, ry, rz = getElementRotation ( theVehicle ) local xt, yt = getVehicleTurretPosition (theVehicle) minigunOne = createWeapon ( "minigun", x, y, z ) setElementAlpha (minigunOne,255) xt = math.deg ( xt ) yt = math.deg ( yt ) setTimer ( function() if ( theVehicle and isElement(theVehicle) and minigunOne and isElement(minigunOne) ) then attachElements ( minigunOne, theVehicle, 0.15, 0, 1.3, 0, yt, xt + 90 ) end end, 500, 0 ) bindKey ( "mouse1", "down", enableFire ) bindKey ( "mouse1", "up", disableFire ) end end) addEventHandler("onClientVehicleExit", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then if minigunOne then destroyElement (minigunOne) unbindKey ( "mouse1", "down", enableFire ) unbindKey ( "mouse1", "up", disableFire ) end end end ) function enableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "firing" ) end, 50, 1) MiniSound = playSound3D("Pro_Minigun.wav", x, y, z, true) setSoundVolume(MiniSound, 1) setSoundSpeed ( MiniSound, 0.9 ) setSoundMaxDistance(MiniSound, 50) end end function disableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "firing" ) end, 50, 1) end end Not tested ,
  13. Try this ; function RelativeToAbsolute( X, Y ) rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end addEventHandler("onClientRender",getRootElement(), function( ) local x,y = RelativeToAbsolute(0.00, -0.90) dxDrawImage(x,y,rX,rY,"img/lobby-bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) Not tested .
  14. Just try to add it to the group i said ! and see what happened.
  15. Try this : -- Server Side -- local vehMark = createMarker(305.371582,1812.62744,17.640625, "cylinder",2, 255, 0, 0, 170) function openVehicleSpawnServer(hitElement,matchingDimension) if not isPedInVehicle(hitElement) then triggerClientEvent(hitElement,"openVehicleSpawn",hitElement) end end addEventHandler("onMarkerHit",vehMark,openVehicleSpawnServer) function spawnVehicleServer(id) local x,y,z = getElementPosition(source) local myVeh = createVehicle(id,x+5,y,z) if id == "" then outputChatBox("error:you did not input any value.",source,255,0,0,true) triggerClientEvent(source,"openVehicleSpawn",source) return false end if myVeh then warpPedIntoVehicle(source,myVeh) outputChatBox("you have spawned and have been warped into ("..getVehicleNameFromID(id)..") it",source) else outputChatBox("ERROR: The requested ID does not exist.",source,255,0,0,true) triggerClientEvent(source,"openVehicleSpawn",source) end end addEvent("spawnVehicleServer",true) addEventHandler("spawnVehicleServer",root,spawnVehicleServer) -- Client Side -- function openVehicleSpawnClient() local screenwidth, screenheight = guiGetScreenSize() local windowWidth, windowheight = 233, 104 local left = windowWidth/2 - windowWidth/2 local top = screenheight/2 - windowheight/2 showCursor(true) vehSpawnWin = guiCreateWindow(left, top, windowWidth, windowheight, "Vehicle Spawner",false) guiWindowSetSizable(vehSpawnWin, false) sampleLabel = guiCreateLabel (15, 25, 201, 20, "Sample Vehicle Spawner", false,vehSpawnWin) guiLabelSetVerticalAlign(sampleLabel, "center") box = guiCreateEdit(0.07, 0.43, 0.82, 0.22,"", true, vehSpawnWin) guiEditSetMaxLength(box,3) spawnBtn = guiCreateButton(14, 75, 211, 23, "Spawn Vehicle", false, vehSpawnWin) addEventHandler("onClientGUIClick",spawnBtn,spawnVehicleClient) end addEvent("openVehicleSpawn",true) addEventHandler("openVehicleSpawn",localPlayer,openVehicleSpawnClient) function spawnVehicleClient() local id = guiGetText(box) triggerServerEvent("spawnVehicleServer",localPlayer,id) showCursor(false) guiSetVisible(vehSpawnWin,false) end < >
  16. Use that same function .
  17. Oh this ? GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(451, 205, 388, 289, "", false) guiSetAlpha(GUIEditor.button[1], 0.28) end ) Exactly and make the alpha 0 and make the buttons relative !! from the guieditor options .
  18. Will you have to create a gui panel with gui buttons ..etc and use these function's ; createMarker "onClientMarkerHit" guiSetVisible showCursor guiGridListSetItemText guiGridListAddRow "onClientGUIClick" triggerClientEvent guiGridListGetItemText guiGridListGetSelectedItem -- server getVehicleIDFromName createVehicle
  19. You can make a invisible buttons and do what you want .
  20. You want a script when you hit a Marker you will get a math.random vehicles from that vehicles you said?
  21. Add this to admin group in ur acl.xml file : "resource.You're resource name">
  22. I Get this code from SolidSnake : function RelativeToAbsolute( X, Y ) local rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end convert it to relative and then use this function ^^ . And you're code should be : function RelativeToAbsolute( X, Y ) rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end addEventHandler("onClientRender",getRootElement(), function( ) local x,y = RelativeToAbsolute(0.08, 0.02) dxDrawText("Choose an arena",x,y,rX, rY, tocolor(255, 255, 255, 255), 3.00, "bankgothic", "center", "center", false, false, true, false, false) end ) Not tested !!
  23. https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897
×
×
  • Create New...