The moVer Posted April 22, 2015 Share Posted April 22, 2015 السلام عليكم ورحمة الله وبركاته ابي تجاوبوني على سؤال بسيط والي هة كيف اعمل ماركر بدمنشن غير يعني عالم غير وكيف اخلي اللاعب يرسبن بدمنشن غير Link to comment
Simple. Posted April 22, 2015 Share Posted April 22, 2015 آستخدم فنكشن عشآن تخلي آلماركر ب دمنشن معين setElementDimension وبخصوص آلرسبنه ركز على آرقمنتات آلفنكشن حق spawnPlayer bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] ) Link to comment
yazan Posted April 22, 2015 Share Posted April 22, 2015 local marker = createMarker(1789, 812, 11, "cylinder", 10, 0, 0, 0, 0) addEventHandler("onMarkerHit", resourceRoot, function(element) if source == marker then if getElementType(element) == "player" then spawnPlayer (element, x, y, z, _, _, _, 3) end end end) addEventHandler("onResourceStart", resourceRoot, function(mm) if getElementType(mm) == "Marker" then if (getElementDimension (mm) == 0) then setElementDimension (mm, 1) end end end) Link to comment
The moVer Posted April 23, 2015 Author Share Posted April 23, 2015 لما انقل ماركر بتضل وظيفته موجودة لام اخش المنطقة نفسها بالدمنشن الاول تشتغل وبالدمنشن الثاني تشتغل Link to comment
The moVer Posted April 23, 2015 Author Share Posted April 23, 2015 يعني انا عامل ماركر سيارات في دمنشن 1 بس اخش المنطقة حقت الماركر في دمنشن 2 تشتغل الوظيفة انا ابيها بس بدمنشن واحد Link to comment
Simple. Posted April 23, 2015 Share Posted April 23, 2015 يعني انا عامل ماركر سيارات في دمنشن 1 بس اخش المنطقة حقت الماركر في دمنشن 2 تشتغل الوظيفة انا ابيها بس بدمنشن واحد ورني اكوادك Link to comment
The moVer Posted April 23, 2015 Author Share Posted April 23, 2015 --Client Side local blip2 = createBlip (1536.27, -1686.387, 13.546,5) addEventHandler( "onClientResourceStart", resourceRoot, function ( ) progress = guiCreateProgressBar( 0.8, 0.8, 0.1, 0.1, true ) marker = createMarker ( 3005.3,817,45.6,"cylinder", 2, 255, 255, 255, 50) guiSetVisible ( progress, false ) setElementDimension ( marker, 2 ) end ) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( element ) if ( source == marker ) then if ( element == getLocalPlayer ( ) and not getPedOccupiedVehicle ( element ) ) then triggerServerEvent("chp", localPlayer) end end end) addEvent("p", true) addEventHandler("p", root, function guiSetVisible ( progress, true ) guiProgressBarSetProgress ( progress, 0 ) function updateProgress ( ) guiProgressBarSetProgress ( progress, guiProgressBarGetProgress ( progress ) + 1 ) if ( guiProgressBarGetProgress ( progress ) == 100 ) then guiSetVisible ( progress, false ) outputChatBox ( "* CTF Completed" ) triggerServerEvent("CtfC", localPlayer) guiProgressBarSetProgress ( progress, 0 ) if isTimer ( timer ) then killTimer ( timer ) end end end timer = setTimer ( updateProgress, 600, 0) end end addEventHandler ( "onClientMarkerLeave", resourceRoot, function ( element ) if ( source == marker ) then if ( element == getLocalPlayer ( ) and not getPedOccupiedVehicle ( element ) ) then end if isTimer ( timer ) then killTimer ( timer ) timer = nil guiProgressBarSetProgress ( progress, 0 ) guiSetVisible ( progress, false ) end end) --Server Side addEvent("chp", true) addEventHandler("chp", root, function local policeTeam = getTeamFromName ("Police") if (policeTeam) then local police = getPlayersInTeam (policeTeam) triggerClientEvent(client, "p", client) end end end Link to comment
yazan Posted April 24, 2015 Share Posted April 24, 2015 استخدم تحقق ذا if ( getElementDimension ( source ) == 1 ) then ----------------------------------- addEventHandler ( "onClientMarkerHit", resourceRoot, function ( element ) if ( source == marker ) then if ( element == localPlayer ) and not ( getPedOccupiedVehicle ( element ) ) then if ( getElementDimension ( element ) == 1 ) then triggerServerEvent("chp", localPlayer) end end end end) Link to comment
The moVer Posted April 24, 2015 Author Share Posted April 24, 2015 شكرا شباب ما قصرتو 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