Jump to content

LOAM

Members
  • Posts

    129
  • Joined

  • Last visited

Everything posted by LOAM

  1. شكرا للتوضيح
  2. شكرا يا باشا المود اهو يا باشا ممكن تعرفنى اعدل على ايه -----الكلنت coptargets = 0 --ADDS BLIPS AND MARKERS FOR POLICE STATIONS addEvent("copdirections", true) function copshops() if coptargets == 0 then coptargets = 1 blip1 = createBlip ( 2246.1008300781, 2453.1953125, 9.8203125, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker1 = createMarker ( 2246.1008300781, 2453.1953125, 9.8203125, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape1 = createColSphere ( 2246.1008300781, 2453.1953125, 9.8203125, 6 ) setElementData ( colshape1, "purpose", "copshop" ) blip2 = createBlip ( -1406.9072265625, 2655.0927734375, 55.6875, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker2 = createMarker ( -1406.9072265625, 2655.0927734375, 55.6875, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape2 = createColSphere ( -1406.9072265625, 2655.0927734375, 55.6875, 6 ) setElementData ( colshape2, "purpose", "copshop" ) blip3 = createBlip ( -209.9542, 977.7558, 18.188976, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker3 = createMarker ( -209.9542, 977.7558, 18.188976, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape3 = createColSphere (-209.9542, 977.7558, 18.188976, 6 ) setElementData ( colshape3, "purpose", "copshop" ) blip4 = createBlip ( -1628.2619628906, 676.62005615234, 6.1901206970215, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker4 = createMarker ( -1628.2619628906, 676.62005615234, 6.1901206970215, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape4 = createColSphere ( -1628.2619628906, 676.62005615234, 6.1901206970215, 6 ) setElementData ( colshape4, "purpose", "copshop" ) blip5 = createBlip ( 624.66278076172, -605.72027587891, 15.923292160034, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker5 = createMarker ( 624.66278076172, -605.72027587891, 15.923292160034, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape5 = createColSphere ( 624.66278076172, -605.72027587891, 15.923292160034, 6 ) setElementData ( colshape5, "purpose", "copshop" ) blip6 = createBlip ( 1565.3386230469, -1628.5202636719, 12.382812, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker6 = createMarker ( 1565.3386230469, -1628.5202636719, 12.382812, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape6 = createColSphere ( 1565.3386230469, -1628.5202636719, 12.382812, 6 ) setElementData ( colshape6, "purpose", "copshop" ) blip7 = createBlip ( -2164.3779296875, -2389.533203125, 29.617206573486, 30, 3, 0, 0, 255, 255, 50, getLocalPlayer() ) marker7 = createMarker ( -2164.3779296875, -2389.533203125, 29.617206573486, "cylinder", 6, 0, 0, 255, 55, getLocalPlayer() ) colshape7 = createColSphere ( -2164.3779296875, -2389.533203125, 29.617206573486, 6 ) setElementData ( colshape7, "purpose", "copshop" ) end end addEventHandler("copdirections", getRootElement(), copshops) --TRIGGERED WHEN A COP STATION IS REACHED function copshophit (theshape) if isElement(theshape) then if (getElementData(theshape, "purpose") == "copshop" ) then if ( getElementType( source ) == "player" ) then if (getElementData ( source, "currentstatus" ) == "underarrest") then local thecaptor = (getElementData ( source, "captor" )) local mx, my, mz = getElementPosition(theshape) local clientprisonercheck = setTimer ( clientcheckforprisoners, 1500, 1, thecaptor ) triggerServerEvent ("lockemup", getLocalPlayer (), source, mx, my, mz ) end end end end end addEventHandler ( "onClientElementColShapeHit", getRootElement(), copshophit) function clientcheckforprisoners(thecop) if isElement(thecop) then local prisoners = 0 local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == thecop ) then prisoners = prisoners+1 end end if prisoners == 0 then setElementData ( thecop, "currentarrests", "none" ) clearcopshops() elseif prisoners == 1 then setElementData ( thecop, "currentarrests", "single" ) elseif prisoners == 2 then setElementData ( thecop, "currentarrests", "double" ) end end end --REMOVES POLICE STATION BLIPS FROM COPS RADAR AND THE MARKERS addEvent("clearcopdirections", true) function clearcopshops() if coptargets == 1 then coptargets = 0 destroyElement ( blip1 ) destroyElement ( marker1 ) destroyElement ( colshape1 ) destroyElement ( blip2 ) destroyElement ( marker2 ) destroyElement ( colshape2 ) destroyElement ( blip3 ) destroyElement ( marker3 ) destroyElement ( colshape3 ) destroyElement ( blip4 ) destroyElement ( marker4 ) destroyElement ( colshape4 ) destroyElement ( blip5 ) destroyElement ( marker5 ) destroyElement ( colshape5 ) destroyElement ( blip6 ) destroyElement ( marker6 ) destroyElement ( colshape6 ) destroyElement ( blip7 ) destroyElement ( marker7 ) destroyElement ( colshape7 ) end end addEventHandler("clearcopdirections", getRootElement(), clearcopshops) ----------------السرفر kingCOP = createElement( "Pgroup", "cops" ) kingCIV = createElement( "Pgroup", "civs" ) kingNONE = createElement( "Pgroup", "none" ) function legalstartup(startedresource) if startedresource == getThisResource() then WantedWatch = setTimer (wantedlevelmonitor, 1000, 0) local allplayers = getElementsByType ( "player" ) local detectmethod = get("legalsystem.Copmethod") for playerKey,thePlayer in ipairs(allplayers) do if detectmethod == "team" then local copteam = get("legalsystem.Copteam") local thisTeam = getPlayerTeam(thePlayer) if thisTeam ~= false then if thisTeam == getTeamFromName(copteam) then setElementParent ( thePlayer, kingCOP ) else setElementParent ( thePlayer, kingCIV ) end end elseif detectmethod == "skin" then local thisSkin = getPedSkin(thePlayer) setElementData(getRootElement(),"Copskins",get("legalsystem.Copskins")) local copskins = getElementData(getRootElement(),"Copskins") if type(copskins) == "table" and #copskins > 0 then for k,skinID in ipairs(copskins) do copskins[skinID] = true end end local isacop = 0 for ElementKey, ElementValue in ipairs ( copskins ) do if thisSkin == ElementValue then isacop = 1 end end if isacop == 1 then setElementParent ( thePlayer, kingCOP ) else setElementParent ( thePlayer, kingCIV ) end end end end end addEventHandler( "onResourceStart", getRootElement(), legalstartup) function copSpawnCheck() local detectmethod = get("legalsystem.Copmethod") if detectmethod == "team" then local copteam = get("legalsystem.Copteam") local thisTeam = getPlayerTeam(source) if thisTeam ~= false then if thisTeam == getTeamFromName(copteam) then setElementParent ( source, kingCOP ) else setElementParent ( source, kingCIV ) end end elseif detectmethod == "skin" then local thisSkin = getPedSkin(source) setElementData(getRootElement(),"Copskins",get("legalsystem.Copskins")) local copskins = getElementData(getRootElement(),"Copskins") if type(copskins) == "table" and #copskins > 0 then for k,skinID in ipairs(copskins) do copskins[skinID] = true end end local isacop = 0 for ElementKey, ElementValue in ipairs ( copskins ) do if thisSkin == ElementValue then isacop = 1 end end if isacop == 1 then setElementParent ( source, kingCOP ) else setElementParent ( source, kingCIV ) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), copSpawnCheck ) --ARREST PLAYERS BY SMACKING WITH A NIGHTSTICK function rodneykingcheck ( attacker, weapon, bodypart, loss ) if (attacker) and (weapon == 3) then if getElementParent(attacker) == kingCOP then local thecop = attacker local theprisoner = source local wlevel = getPlayerWantedLevel( source ) if (getElementData ( theprisoner, "currentstatus" ) ~= "underarrest") and (wlevel > 0) then if (getElementData ( attacker, "currentarrests" ) ~= "single" ) and (getElementData ( attacker, "currentarrests" ) ~= "double" ) then setElementData ( thecop, "currentarrests", "single" ) triggerClientEvent(thecop,"copdirections",thecop) elseif (getElementData ( attacker, "currentarrests" ) == "single" ) then setElementData ( thecop, "currentarrests", "double" ) end setElementData ( theprisoner, "currentstatus", "underarrest" ) setElementData ( theprisoner, "captor", thecop ) showCursor ( source, true ) toggleAllControls ( source, false, true, false ) walktheprisoner ( thecop, theprisoner ) setElementData ( theprisoner, "arrestTimeout", setTimer ( freetheguy, 180000, 1, theprisoner )) end end end end addEventHandler ( "onPlayerDamage", getRootElement(), rodneykingcheck ) --ARREST PLAYERS BY HOLDING THEM AT GUNPOINT IF THEY HAVE LOW HP function sightscheck ( element ) if isElement(element) then if ( getElementType ( element ) == "player" ) then if ( getControlState ( source, "aim_weapon" ) ) then local currentgun = getPlayerWeapon ( source ) local wlevel = getPlayerWantedLevel( element ) if (currentgun > 19) and (currentgun < 39) and (wlevel > 0) then if getElementParent(source) == kingCOP then local thecop = source local theprisoner = element local cx, cy, cz = getElementPosition ( source ) local px, py, pz = getElementPosition ( element ) if ( getElementHealth ( element ) < 15 ) and ( getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) < 3 ) then if (getElementData ( theprisoner, "currentstatus" ) ~= "underarrest" ) then if (getElementData ( thecop, "currentarrests" ) ~= "single" ) and (getElementData ( thecop, "currentarrests" ) ~= "double" ) then triggerClientEvent(thecop,"copdirections",thecop) setElementData ( thecop, "currentarrests", "single" ) elseif (getElementData ( thecop, "currentarrests" ) == "single" ) then setElementData ( thecop, "currentarrests", "double" ) end setElementData ( theprisoner, "currentstatus", "underarrest" ) setElementData ( theprisoner, "captor", thecop ) showCursor ( theprisoner, true ) toggleAllControls ( theprisoner, false, true, false ) walktheprisoner ( thecop, theprisoner ) setElementData ( theprisoner, "arrestTimeout", setTimer ( freetheguy, 180000, 1, theprisoner )) -- local arresttoolong = setTimer ( freetheguy, 180000, 1, theprisoner ) end end end end end end end end addEventHandler ( "onPlayerTarget", getRootElement(), sightscheck ) --ARREST PLAYERS BY PULLING THEM OUT OF A VEHICLE function yankhimout(player, seat, jacker) if isElement(jacker) then if getElementParent(jacker) == kingCOP then local wlevel = getPlayerWantedLevel( player ) if wlevel > 0 then if (getElementData ( jacker, "currentarrests" ) ~= "single" ) and (getElementData ( jacker, "currentarrests" ) ~= "double" ) then local thecop = jacker local theprisoner = player setElementData ( theprisoner, "currentstatus", "underarrest" ) setElementData ( theprisoner, "captor", thecop ) setElementData ( thecop, "currentarrests", "single" ) triggerClientEvent(thecop,"copdirections",thecop) showCursor ( theprisoner, true ) toggleAllControls ( theprisoner, false, true, false ) walktheprisoner ( thecop, theprisoner ) setElementData ( theprisoner, "arrestTimeout", setTimer ( freetheguy, 180000, 1, theprisoner )) elseif (getElementData ( jacker, "currentarrests" ) == "single" ) then local thecop = jacker local theprisoner = player setElementData ( theprisoner, "currentstatus", "underarrest" ) setElementData ( theprisoner, "captor", thecop ) setElementData ( thecop, "currentarrests", "double" ) showCursor ( theprisoner, true ) toggleAllControls ( theprisoner, false, true, false ) walktheprisoner ( thecop, theprisoner ) setElementData ( theprisoner, "arrestTimeout", setTimer ( freetheguy, 180000, 1, theprisoner )) end end end end end addEventHandler ( "onVehicleExit", getRootElement(), yankhimout ) --FORCES A PRISONER TO FOLLOW THE COP function walktheprisoner(thecop, theprisoner) if (getElementData ( theprisoner, "currentstatus" ) == "underarrest") and (getPedOccupiedVehicle ( theprisoner ) == false ) then local copx, copy, copz = getElementPosition ( thecop ) local prisonerx, prisonery, prisonerz = getElementPosition ( theprisoner ) copangle = ( 360 - math.deg ( math.atan2 ( ( copx - prisonerx ), ( copy - prisonery ) ) ) ) % 360 setPedRotation ( theprisoner, copangle ) setCameraTarget ( theprisoner, theprisoner ) local dist = getDistanceBetweenPoints2D ( copx, copy, prisonerx, prisonery ) if ( dist > 16 ) then freetheguy ( theprisoner ) --FREES PRISONER IF HE GETS FAR AWAY elseif ( dist > 12 ) then setControlState ( theprisoner, "sprint", true ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", true ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) elseif ( dist > 6 ) then setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", true ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) elseif ( dist > 1.5 ) then setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", true ) setControlState ( theprisoner, "forwards", true ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) elseif ( dist < 1.5 ) then setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", false ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) end end end --FREES A PLAYER (RESETS THEIR CONTROLS AND STATUS) function freetheguy (theprisoner) local thecaptor = (getElementData ( theprisoner, "captor" )) setElementData ( theprisoner, "currentstatus", "none" ) setElementData ( theprisoner, "captor", "none" ) showCursor ( theprisoner, false ) setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", false ) toggleAllControls (theprisoner, true) local prisonercheck = setTimer ( checkforprisoners, 1500, 1, thecaptor ) TimoutTimer = (getElementData ( theprisoner, "arrestTimeout" )) if isTimer(TimoutTimer) then killTimer(TimoutTimer) setElementData ( theprisoner, "arrestTimeout", nil) TimeoutTimer = nil end end function checkforprisoners(thecop) if isElement(thecop) then local prisoners = 0 local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == thecop ) then prisoners = prisoners+1 end end if prisoners == 0 then setElementData ( thecop, "currentarrests", "none" ) triggerClientEvent( thecop,"clearcopdirections",thecop) elseif prisoners == 1 then setElementData ( thecop, "currentarrests", "single" ) elseif prisoners == 2 then setElementData ( thecop, "currentarrests", "double" ) end end end --[[ BLOCKED TO PREVENT CHEATING (WAS USED FOR TESTING) function cheatescape (playerSource) freetheguy ( playerSource ) setPlayerWantedLevel( playerSource, 0 ) end addCommandHandler ( "freeme", cheatescape ) ]] -- FREE PRISONER IF DEATH OF COP OR PRISONER function someonedied( ammo, attacker, weapon, bodypart ) local wlevel = getPlayerWantedLevel( source ) if wlevel > 0 then if isElement(attacker) then if getElementParent(attacker) == kingCOP then local Kreward = get("legalsystem.Kreward") local thisreward = wlevel*Kreward givePlayerMoney ( attacker, thisreward ) -- REWARDS A KILL IF THE PLAYER HAS A WANTED LEVEL end end end if (getElementData ( source, "currentstatus" ) == "underarrest") then freetheguy ( source ) --IF A PRISONER DIES, FREES THEM FOR RESPAWN end if (getElementData ( source, "currentarrests" ) == "single" ) or (getElementData ( source, "currentarrests" ) == "double" ) then setElementData ( source, "currentarrests", "none" ) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == source ) then freetheguy ( thePlayer ) --IF A COP DIES, FREES ALL HIS PRISONERS end end end end addEventHandler ( "onPlayerWasted", getRootElement(), someonedied ) -- FREE PRISONER IF COP WAS JACKED OUT OF A CAR function playergotout( player, seat, jacker ) if isElement(jacker) then if (getElementData ( player, "currentarrests" ) == "single" ) or (getElementData ( player, "currentarrests" ) == "double" ) then local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == player ) then freetheguy ( thePlayer ) end end end end end addEventHandler ( "onVehicleExit", getRootElement(), playergotout ) -- FREE PRISONER IF THE COP OR THE PRISONER DISCONNECTS function aplayerleft() if (getElementData ( source, "currentarrests" ) == "single" ) or (getElementData ( source, "currentarrests" ) == "double" ) then local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == source ) then freetheguy ( thePlayer ) -- IF A COP DISCONNECTS, FREES HIS PRISONERS end end end end addEventHandler ( "onPlayerQuit", getRootElement(), aplayerleft ) -- FREE PRISONER IF A COP CAR GOT TOO DAMAGED function cardamaged(loss) local carid = getElementModel( source ) if carid == 598 or carid == 596 or carid == 597 or carid == 427 or carid == 490 then local carhealth = getElementHealth ( source ) if ( getElementHealth ( source ) < 500 ) then guy1 = getVehicleOccupant ( source, 2 ) if isElement(guy1) then if (getElementData ( guy1, "currentstatus" ) == "underarrest") then freetheguy( guy1 ) end end guy2 = getVehicleOccupant ( source, 2 ) if isElement(guy2) then if (getElementData ( guy2, "currentstatus" ) == "underarrest") then freetheguy( guy2 ) end end guy3 = getVehicleOccupant ( source, 3 ) if isElement(guy3) then if (getElementData ( guy3, "currentstatus" ) == "underarrest") then freetheguy(guy3) end end end end end addEventHandler ( "onVehicleDamage", getRootElement(), cardamaged ) --LOADS A PRISONER INTO A COP CAR function copcarenter (vehicle, seat, jacked ) local carid = getElementModel( vehicle ) if carid == 598 or carid == 596 or carid == 597 or carid == 427 or carid == 490 then if getElementParent(source) == kingCOP then if (getElementData ( source, "currentarrests" ) == "single" ) or (getElementData ( source, "currentarrests" ) == "double" ) then local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == source ) then local copx, copy, copz = getElementPosition ( source ) local prisonerx, prisonery, prisonerz = getElementPosition ( thePlayer ) local dist = getDistanceBetweenPoints2D ( copx, copy, prisonerx, prisonery ) if ( dist < 6 ) then if (getVehicleOccupant ( vehicle, 2 ) == false) then warpPedIntoVehicle ( thePlayer, vehicle, 2 ) elseif (getVehicleOccupant ( vehicle, 3 ) == false) then warpPedIntoVehicle ( thePlayer, vehicle, 3 ) end end end end end end elseif carid == 599 then if getElementParent(source) == kingCOP then if (getElementData ( source, "currentarrests" ) == "single" ) or (getElementData ( source, "currentarrests" ) == "double" ) then local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData ( thePlayer, "captor" ) == source ) then local copx, copy, copz = getElementPosition ( source ) local prisonerx, prisonery, prisonerz = getElementPosition ( thePlayer ) local dist = getDistanceBetweenPoints2D ( copx, copy, prisonerx, prisonery ) if ( dist < 6 ) then if (getVehicleOccupant ( vehicle, 2 ) == false) then warpPedIntoVehicle ( thePlayer, vehicle, 1 ) end end end end end end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), copcarenter ) --WARPS A PRISONER TO JAIL AND MAKES THEM SERVE THEIR TIME addEvent ("lockemup", true ) function donotpassgo(player, mx, my, mz) if (isPedInVehicle(player)) then removePedFromVehicle(player) end local thecaptor = (getElementData ( player, "captor" )) if isElement(thecaptor) then local prisonercheck = setTimer ( checkforprisoners, 1500, 1, thecaptor ) local wlevel = getPlayerWantedLevel( player ) local Areward = get("legalsystem.Areward") local thisreward = wlevel*Areward givePlayerMoney ( thecaptor, thisreward ) -- REWARDS AN ARREST end setElementInterior(player, 6) local dimension = math.random ( 7, 99 ) setElementDimension ( player, dimension ) setElementPosition(player, 265.34832763672, 78.314476013184, 1001.0390625) showCursor ( player, false ) setControlState ( player, "sprint", false ) setControlState ( player, "walk", false ) setControlState ( player, "forwards", false ) toggleAllControls (player, true) setElementData ( player, "captor", "none" ) triggerEvent ( "onJailsStart", player ) -- TRIGGERS DELETION OF BLIP ONCE JAILED local jailtime = get("legalsystem.jailtime") local hadenough = setTimer ( doingyourtime, jailtime, 1, player, mx, my, mz ) TimoutTimer = (getElementData ( player, "arrestTimeout" )) if isTimer(TimoutTimer) then killTimer(TimoutTimer) setElementData ( player, "arrestTimeout", nil) TimeoutTimer = nil end end addEventHandler ( "lockemup", getRootElement(), donotpassgo ) function doingyourtime(player, mx, my, mz) local wlevel = getPlayerWantedLevel( player ) if wlevel > 0 then setPlayerWantedLevel( player, wlevel-1 ) local jailtime = get("legalsystem.jailtime") local hadenough = setTimer ( doingyourtime, jailtime, 1, player, mx, my, mz ) else shawshank(player, mx, my, mz) end end --LETS A PRISONER OUT OF JAIL function shawshank(player, mx, my, mz) setElementInterior(player, 0) setElementDimension ( player, 0) setElementPosition(player, mx, my, mz+1) setElementData ( player, "currentstatus", "none" ) end --MONITORS WANTED LEVELS AND CREATES OR DESTROYS BLIP BASED ON WANTED LEVEL function wantedlevelmonitor() local allplayers = getElementsByType ( "player" ) for playerKey,thePlayer in ipairs(allplayers) do if (getElementData ( thePlayer, "wantedstatus" ) ~= "Wanted" ) then if getPlayerWantedLevel(thePlayer) > 0 then setElementData ( thePlayer, "wantedstatus", "Wanted", false ) end else if getPlayerWantedLevel(thePlayer) == 0 then setElementData ( thePlayer, "wantedstatus", "unWanted", false ) end end end end function changestatus (dataName) if getElementType ( source ) == "player" and dataName == "wantedstatus" then if (getElementData ( source, "wantedstatus" ) == "Wanted" ) then local thisblip = createBlipAttachedTo (source, 56, 4, 255, 0, 0, 255, 0, 99999, kingCOP ) setElementData ( thisblip, "purpose", "wantedblip", false ) elseif (getElementData ( source, "wantedstatus" ) == "unWanted" ) then local attachedElements = getAttachedElements ( source ) if ( attachedElements ) then for ElementKey, ElementValue in ipairs ( attachedElements ) do if (getElementData ( ElementValue, "purpose" ) == "wantedblip" ) then destroyElement(ElementValue) end end end end end end addEventHandler( "onElementDataChange", getRootElement(), changestatus )
  3. السلام عليكم شباب ازاى اعمل رنقات فى اسل الادمن مثلا level 1 level2 وهكذا وكل لفل يتفتحلو حاجا فى لوحه الادمن مثلا لفل واحد ميقدرش يعطى حد فلوس ولا اسكين ولا يعمل واارب لحد ان شاء الله تكونو فهمتو قصدى وشكرا
  4. بس لو اضافو فى الاسل ادمن محدش هيقدر ياخد وظيفه الشرطه غير الادمن
  5. اه فهمتك شكرا جدا
  6. وهيترقى لوحدو لما انزل المود واقبض
  7. السلام عليكم شباب انا عوز اعمل رتب للشرطه ترقيات كده مثلا لو قبض على 50 حرامى يترقى لرتبه مثل ال FBI ويتغير اللبس بتاعو للبس بتاع الترقيه الى اخده وهكذه وشكرا
  8. LOAM

    طلب كود

    addEventHandler("onClientMarkerHit",marker, --عند لمس الماركر المحدد function()--وظيفة if ( getPlayerTeam ( source ).."Criminal" ~= getTeamFromName ( 'Criminal' ) ) then return end guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة showCursor(true) --نظهر الماوس end --نهاية الوظيفة )--نهاية قوس الحدث addEventHandler("onClientGUIClick",root, --عند الضغط على زر function()--وظيفة if (source == GUIEditor.button[1]) then--ان كان الزر = زر الاغلاق guiSetVisible(GUIEditor.window[1],false)--اغلاق اللوحة showCursor(false)--اخفاء الماوس end--نهاية التحقق end--نهاية الوظيفة )--نهاية قوس الحدث هل هذه صحيح
  9. LOAM

    طلب كود

    local marker = createMarker (2485.00000, -1667.00000, 13.34375, "cylinder", 1.5, 255, 255, 0, 170 ) createBlip (2485.00000, -1667.00000, 13.34375, 59 ,2 ) GUIEditor = { memo = {}, button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(299, 118, 514, 473, "تجربة ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(11, 17, 494, 290, "By : [S]haHeR\n\ntest :]\n\n", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(159, 401, 226, 62, "إغلاق", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible (GUIEditor.window[1], false) addEventHandler("onClientMarkerHit",marker, --عند لمس الماركر المحدد function()--وظيفة if ( getPlayerTeam ( source ) ~= getTeamFromName ( 'Criminal' ) ) then return end guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة showCursor(true) --نظهر الماوس end --نهاية الوظيفة )--نهاية قوس الحدث addEventHandler("onClientGUIClick",root, --عند الضغط على زر function()--وظيفة if (source == GUIEditor.button[1]) then--ان كان الزر = زر الاغلاق guiSetVisible(GUIEditor.window[1],false)--اغلاق اللوحة showCursor(false)--اخفاء الماوس end--نهاية التحقق end--نهاية الوظيفة )--نهاية قوس الحدث حطيته بعد عند لمس الماركر برضو اللوحه بتفتح لكل اللعبين
  10. السلام عليكم انا عامل مركر سيارات عوز تيم الحرامى بس هوا الى يقدر ياخد السياره من المركر فقط ازاى شباب
  11. السلام عليكم شباب انا محتاج اكواد سرقه المطعم معايا شوب المطاعم عوز لما اخش المطعم واقنص ب المسدس على الراجل الى جوا المطعم يرفع ايدو ويعطينى فلوس بعد مثلا 30 ثانيه بس لتيم الحرامى بس وشكرا
  12. LOAM

    طلب كود

    ظبطت معايا ردودك جميله ومنسقه
  13. LOAM

    طلب كود

    الف شكر اشتغل اخى بس الرساله مش بتطلع فى الشات لما اخذ الفلوس باخد الفلوس بس الرساله مش بتطلع :]
  14. LOAM

    طلب كود

    شكرا على التصحيح والرد
  15. LOAM

    طلب كود

    عملتها ومش بياخد فلوس اخى لما بضغط على الزر وين الخطاء -- useful function bool isPlayerInTeam ( player thePlayer [, team/Criminal theTeam = nil ] ) function isPlayerInTeam(player, Criminal) assert(isElement(player) and getElementType(player) == "Criminal", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") assert((not Criminal) or type(Criminal) == "Criminal" or (isElement(Criminal) and getElementType(Criminal) == "Criminal"), "Criminal") return getPlayerTeam(player) == (type(Criminal) == "Criminal" and getTeamFromName(Criminal) or (type(Criminal) == "userdata" and Criminal or (getPlayerTeam(player) or true))) end local Team = "Criminal" local Money = 10000 addEvent("givePlayerMoney",true) addEventHandler ("givePlayerMoney",root, function () if isPlayerInTeam(source,"Criminal") then givePlayerMoney ( source , Money ) else outputChatBox("You got money 10000",source,255,0,0,true) end end -- useful function bool isPlayerInTeam ( player thePlayer [, team/Criminal theTeam = nil ] ) function isPlayerInTeam(player, Criminal) assert(isElement(player) and getElementType(player) == "Criminal", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") assert((not Criminal) or type(Criminal) == "Criminal" or (isElement(Criminal) and getElementType(Criminal) == "Criminal"), "Criminal") return getPlayerTeam(player) == (type(Criminal) == "Criminal" and getTeamFromName(Criminal) or (type(Criminal) == "userdata" and Criminal or (getPlayerTeam(player) or true))) end local Team = "Criminal" local Money = 10000 addEvent("givePlayerMoney",true) addEventHandler ("givePlayerMoney",root, function () if isPlayerInTeam(source,"Criminal") then givePlayerMoney ( source , Money ) else outputChatBox("You got money 10000",source,255,0,0,true) end end
  16. LOAM

    طلب كود

    شكرا على المجهود
  17. السلام عليكم شباب عوز من اللوحه دى ان محدش يقدر يعمل هاك غير تيم الحرامى ازاى شباب وتيم الحارامى اسمو Criminal --------------client addEventHandler("onClientMarkerHit",marker, --عند لمس الماركر المحدد function()--وظيفة guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة showCursor(true) --نظهر الماوس end --نهاية الوظيفة )--نهاية قوس الحدث function guiAntiFlood(element, timer) if getElementType ( element ) == "gui-button" then local atimer = tonumber(timer) if atimer == nil or atimer == '' or not tonumber(atimer) then error("Bad Argument the Argument 2 must number") else end guiSetEnabled(element,false) setTimer(function() guiSetEnabled(element,true) end,tonumber(atimer),1) else error("Bad Argument 1 the element must button") end end local Button = GUIEditor.button[3] -- بدل اسم الزر local Time = 40000 -- حط هنا الوقت addEventHandler ( "onClientGUIClick",root, function () if ( source == GUIEditor.button[3] ) then triggerServerEvent ( "givePlayerMoney", localPlayer ) guiAntiFlood(GUIEditor.button[3],40000) else if (source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1],false)--اغلاق اللوحة showCursor(false)--اخفاء الماوس end--نهاية التحقق end--نهاية الوظيفة end )--نهاية قوس الحدث ----------------server local Team = "Criminal" local Money = 10000 addEvent("givePlayerMoney",true) addEventHandler ("givePlayerMoney",root, function () local TeamPlr = getTeamFromName ( "Criminal" ) if TeamPlr then givePlayerMoney ( source , Money ) end end )
  18. هل كده صحيح اخى معلش هتعبك معايا function guiAntiFlood(element, timer) if getElementType ( element ) == "gui-button" then local atimer = tonumber(timer) if atimer == nil or atimer == '' or not tonumber(atimer) then error("Bad Argument the Argument 2 must number") else end guiSetEnabled(element,false) setTimer(function() guiSetEnabled(element,true) end,tonumber(atimer),1) else error("Bad Argument 1 the element must button") end end local Button = Hack -- بدل اسم الزر local Time = 50000 -- حط هنا الوقت addEventHandler("onClientMarkerHit",marker, --عند لمس الماركر المحدد function()--وظيفة guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة showCursor(true) --نظهر الماوس end --نهاية الوظيفة )--نهاية قوس الحدث addEventHandler("onClientGUIClick",root, --عند الضغط على زر function()--وظيفة if ( source == GUIEditor.button[3] ) then triggerServerEvent ( "givePlayerMoney", localPlayer ) guiAntiFlood(GUIEditor.window[1]),Time) else if (source == GUIEditor.button[2]) then--ان كان الزر = زر الاغلاق guiSetVisible(GUIEditor.button[1],false)--اغلاق اللوحة showCursor(false)--اخفاء الماوس end--نهاية التحقق end--نهاية الوظيفة )--نهاية قوس الحدث
  19. شكرا يا باشا ديما ردودك كامله وجميله
  20. هل هذه صحيح واحد صحبى قالى شوفو واسأل فى المنتدى لو غلط GUIEditor = { memo = {}, button = {}, window = {}, checkbox = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(506, 329, 325, 469, "CUA", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.89) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(85, 50, 169, 32, "", false, GUIEditor.window[1]) GUIEditor.memo[2] = guiCreateMemo(85, 126, 169, 32, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(135, 92, 66, 30, "OK", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.button[2] = guiCreateButton(273, 24, 43, 26, "Close", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.checkbox[1] = guiCreateCheckBox(285, 171, 15, 15, "", false, false, GUIEditor.window[1]) GUIEditor.checkbox[2] = guiCreateCheckBox(285, 206, 15, 15, "", false, false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(213, 176, 62, 15, "Deposit", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(213, 206, 62, 15, "Withdrawal", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.button[3] = guiCreateButton(235, 324, 60, 57, "Hack", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFEB1101") GUIEditor.button[4] = guiCreateButton(20, 243, 40, 34, "1", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF") GUIEditor.button[5] = guiCreateButton(20, 301, 40, 34, "4", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF") GUIEditor.button[6] = guiCreateButton(20, 357, 40, 34, "7", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF") GUIEditor.button[7] = guiCreateButton(85, 243, 40, 34, "2", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF") GUIEditor.button[8] = guiCreateButton(150, 243, 40, 34, "3", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF") GUIEditor.button[9] = guiCreateButton(85, 301, 40, 34, "", false, GUIEditor.window[1]) GUIEditor.button[10] = guiCreateButton(85, 301, 40, 34, "5", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF") GUIEditor.button[11] = guiCreateButton(85, 357, 40, 34, "8", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFFFFFF") GUIEditor.button[12] = guiCreateButton(150, 301, 40, 34, "6", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[12], "NormalTextColour", "FFFFFFFF") GUIEditor.button[13] = guiCreateButton(150, 357, 40, 34, "9", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[13], "NormalTextColour", "FFFFFFFF") GUIEditor.button[14] = guiCreateButton(80, 414, 51, 38, "0", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[14], "NormalTextColour", "FFFFFFFF") guiSetVisible (GUIEditor.window[1], false) addEventHandler("onClientMarkerHit",marker, --عند لمس الماركر المحدد function()--وظيفة guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة showCursor(true) --نظهر الماوس end --نهاية الوظيفة )--نهاية قوس الحدث addEventHandler("onClientGUIClick",root, --عند الضغط على زر function()--وظيفة if (source == GUIEditor.button[3]) then triggerServerEvent("Hack",localPlayer) givePlayerMoney ( sourec, 10000 ) else if (source == GUIEditor.button[2]) then--ان كان الزر = زر الاغلاق guiSetVisible(GUIEditor.button[2],false)--اغلاق اللوحة showCursor(false)--اخفاء الماوس end--نهاية التحقق end--نهاية الوظيفة )--نهاية قوس الحدث
  21. السلام عليكم شباب انا عملت اللوحه دى فى هذه الرابط http://imgur.com/a/7rabP عوز اول ما ايه حد فى تيم الحرامى يدوس على كلمه hack ياحد فلوس مثلا 10 الاف ومينفعش ياخد تانى غير بعد 5 دقائق مثلا وشكر
  22. LOAM

    طلب كود

    شكرا شباب على الرد بس انا لان مفا همت شى انا اريد لما واحد يشترى سياره واحد او اكثر عوزو لما يروح للماركر الى انا بقول عليه يختار ايه سياره هوا اشتراه عشان يركبو وشكر
×
×
  • Create New...