Jump to content

DonOmar

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by DonOmar

  1. hi guys today i made a code to fix vehicle for DL3 but i want to disable it in dimension 366 so what shoul i do ? here is the code. function fixVeh ( thePlayer ) setTimer (function () if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "DL3" ) ) then for _, vehicle in ipairs ( getElementsByType ( 'vehicle' ) ) do fixVehicle ( vehicle ) end end end,15000, 1) end addCommandHandler( "fixv", fixVeh )
  2. Hello guys i wanna Ask for Something . i have made a code for my groups system but i want to do something in this code function leaveMyGang() if (confirmSaleWindow) then return end local width, height = (screenWidth-311)/2, (screenHeight-137)/2 confirmSaleWindow = guiCreateWindow(width, height, 311, 137, "CIF Groups", false) guiSetAlpha(confirmSaleWindow, 0.95) guiWindowSetSizable(confirmSaleWindow, false) notEnoughLabel = guiCreateLabel(14,32,286,66, "Are you sure you want to leave your group?", false, confirmSaleWindow) guiSetAlpha(notEnoughLabel, 1) guiLabelSetVerticalAlign(notEnoughLabel, "top") guiLabelSetHorizontalAlign(notEnoughLabel, "left", true) guiSetFont(notEnoughLabel, "clear-normal") okSellCar = guiCreateButton(75,84,71,36, "Yes", false, confirmSaleWindow) addEventHandler("onClientGUIClick", okSellCar, function() destroyElement(confirmSaleWindow) confirmSaleWindow = nil triggerServerEvent("gang.leavegang", localPlayer) end, false) noSellCar = guiCreateButton(170,84,71,36, "No", false,confirmSaleWindow) addEventHandler("onClientGUIClick", noSellCar, function() destroyElement(confirmSaleWindow) confirmSaleWindow = nil end, false) end i wanna make a Message box to leave a Reason before leaving the group.
  3. this is the whole script (client) status = false function onDie() exports.CIThelp:modTextBar("armor", "") end addEventHandler("onClientPlayerWasted", localPlayer, onDie) function status(status2) if status2 == true then status = true end if status2 == false then status = false end end addEvent("CIFarmor.setStatus", true) addEventHandler("CIFarmor.setStatus", root, status) function buyArmor() if status == true then triggerServerEvent("CIFarmor.buyArmor", localPlayer, localPlayer) end end bindKey("n", "down", buyArmor) Server Side ------------------------------------------------------------------------------------ local armorPick = { {x = 2195.48, y = -1147.18, z = 1029.2, dim = 921, int = 15}, -- JFM 1 {x = 2190.62, y = -1179.36, z = 1029.2, dim = 921, int = 15}, -- JFM 2 {x = 2227.91, y = -1150.60, z = 1025.2, dim = 921, int = 15}, -- JFM 3 -- {x = 2854.01, y = 1325.200, z = 10.500, dim = 0, int = 0}, -- RxN Base {x = 1123.941, y = -2033.68, z = 69.01, dim = 0, int = 0}, -- Crim Villa {x = 571.485, y = -1512.88, z = 8.034, dim = 0, int = 0}, -- FBI base } function createArmorLocations() for index, val in pairs(armorPick) do armorp = createPickup(val.x, val.y, val.z + 0.5, 3, 1242, 50) armorMarker = createMarker(val.x, val.y, val.z + 0.5, "cylinder", 1, 255, 0, 0, 0) setElementDimension(armorp, val.dim) setElementDimension(armorMarker, val.dim) setElementInterior(armorp, val.int) setElementInterior(armorMarker, val.int) addEventHandler("onPickupHit", armorp, armorHit) addEventHandler("onMarkerLeave", armorMarker, armorLeave) addEventHandler("onMarkerHit", armorMarker, armorEnter) end end addEventHandler("onResourceStart", resourceRoot, createArmorLocations) function armorHit(element) cancelEvent() end function armorEnter(element) if (isElement(element) and getElementType(element) == "player") then if (isPedInVehicle(element)) then return end local playerArmor = getPedArmor(element) if playerArmor == 100 then return end if playerArmor <= 10 then price = 1000 elseif playerArmor <= 20 then price = 900 elseif playerArmor <= 30 then price = 800 elseif playerArmor <= 40 then price = 700 elseif playerArmor <= 50 then price = 600 elseif playerArmor <= 60 then price = 500 elseif playerArmor <= 70 then price = 400 elseif playerArmor <= 80 then price = 300 elseif playerArmor <= 90 then price = 200 elseif playerArmor <= 99 then price = 100 end exports.CIThelp:modTextBar(element, "armor", "Press 'n' to buy armor for $"..price, 168, 164, 159, 255) local status = true triggerClientEvent(element, "CIFarmor.setStatus", element, status) end end function armorLeave(plr) local status = false exports.CIThelp:modTextBar(plr, "armor", "", 168, 164, 159, 255) triggerClientEvent(plr, "CIFarmor.setStatus", plr, status) end function buyArmor(plr) setPedArmor(plr, 100) exports.CRPaccounts:TPM(plr, price, "buying amor") exports.CIThelp:dm(plr, "armor", "", 168, 164, 159, 255) end addEvent("CIFarmor.buyArmor", true) addEventHandler("CIFarmor.buyArmor", root, buyArmor)
  4. يا جماعة بدي اتعلم و ابقا محترف انا مو محترف انا مبرمج عادي او ضعيف
  5. This is the Server Side function buyArmor(plr) setPedArmor(plr, 100) exports.CRPaccounts:TPM(plr, price, "buying amor") exports.CIThelp:dm(plr, "armor", "", 168, 164, 159, 255) end addEvent("CIFarmor.buyArmor", true) addEventHandler("CIFarmor.buyArmor", root, buyArmor)
  6. انا بدي اشترك معكن عمري 16
  7. I wanna make a timer for using an armor pickup in this function : function buyArmor() if status == true then triggerServerEvent("CIFarmor.buyArmor", localPlayer, localPlayer) end end bindKey("n", "down", buyArmor)
  8. DonOmar

    Police System Bugs.

    Guys i have a Police system Script and its full of bugs and makes server lag. Can i share the script here to be fixed ? and i knew this bugs cause i had used /debugscript 3. can someone give me some from his time to fix the resource ?
  9. Can anyone help me ? or wanna the whole script to Check it to help me please ?
  10. ye ye i wanna this if u have the resource or help me to create it please
  11. So where i can ask ?
  12. I wanna Ask for Suggestion panel That make player can suggest with his ideas to improve the server and just Staff can see it . Best Regards.
  13. Hello mta Developers, First Problem :- I wanna ask for help About my Jailing System this is not my script but there is something i want to disable VIP system in it like disabling command /vipjetpack just it . Second Problem Donator Script : donator script is giving power to the guy who donates and he must be added in ACL to be a Donator. there is a feature i want to do its /fix To fix vehicle when in it for 250$ , and i want it for an ACL group like DL3. Best Regards , DonOmar
×
×
  • Create New...