SA7R~KSA Posted March 15, 2013 Share Posted March 15, 2013 شباب بغيت منكم تعدلو لي هذا الكود 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 ( 1608.5327148438, -1611.5762939453, 13.71875 ) setElementData ( colshape1, "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 ) end end addEventHandler("clearcopdirections", getRootElement(), clearcopshops) ابيه لما يروح للماركر ينقله لمكان انا احدده ما ابيه ينقله للعالم الوهمي وابيه بوقت لا هنتو ... Link to comment
jafar Posted March 15, 2013 Share Posted March 15, 2013 القسم غلط حط موضوعك في البرمجة Link to comment
PaiN^ Posted March 15, 2013 Share Posted March 15, 2013 أتوقع مو كودك, عندك الإذن إنك تعدل عليه من صاحبه ؟ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now