abedhwetat Posted March 28, 2014 Share Posted March 28, 2014 سلام عليكم شباب ابي كود ماركر ينقلني انا وسيارتي الي مكان الي انا بحطو بس يكون لي تيم وقروب (ارجو التوضيح) Link to comment
al-Kobra Posted March 29, 2014 Share Posted March 29, 2014 createMarker -- تسوي ماركر 'onMarkerHit' -- اذا اللعب لمس الماركر getElementsByType -- تتحقق ان الا لمس الماركر سيارة isPedInVehicle -- اذا كان اللاعب في السيارة getElementData -- تجيب اسم القروب getPlayerTeam > getTeamName -- تجيب اسم التيم setElementPosition -- هنا تنقله الى المكان الا تبغيه Link to comment
KaduRo Posted March 29, 2014 Share Posted March 29, 2014 marker = createMarker(...) -- نصنع ماركر addEventHandler("onClientMarkerHit" , marker , -- onMarkerHit إن كان هذا الكود في قسم السيرفر تستخدم function () getElementData("team" , teamname) -- setElementData نجيب اسم الفريق من قسم السيرفر بإستخدام وظيفة -- ( setElementData , getElementData إن كان الكود في قسم السيرفر لاتستخدم الامرين ) if getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) == teamname then -- نتحقق ان اللاعب مع الفريق if getPedOccupiedVehicle(source) then -- إن كان اللاعب داخل مركبة setElementPosition(x,y,z) -- المكان الي راح ينتقل له اللاعب else return -- إن كان اللاعب مو بمركبة ما راح ينتقل else outputChatBox("you are not with that team") -- إن كان اللاعب مو مع الفريق يطلع له كلام end end end ) إن كان في خطأ ارجوا من الاخوان يوضحونه ! ^ Link to comment
abedhwetat Posted March 29, 2014 Author Share Posted March 29, 2014 انا ابي كود الماركر الي ينقلني انا وسيارتي بس ابيه لي نو تيم وعصابه Link to comment
KaduRo Posted March 29, 2014 Share Posted March 29, 2014 ممكن توضح بمقصد نو تيم وعصابة ؟ وانا كتبت فوق مثال للكود ! Link to comment
al-Kobra Posted March 29, 2014 Share Posted March 29, 2014 marker = createMarker ( x, y, z, "cylinder", size, r, b, g, alpha ) local = mx, my, mz = احداثياتك addEventHandler( "onMarkerHit", marker, function ( element ) if getElementType ( element ) == "player" and isPedInVehicle ( element ) and getElementData ( element, "gang" ) == "اسم العصابة" and getTeamName ( getPlayerTeam ( source ) ) == "اسم التيم" then setElementPosition ( element, mx, my, mz ) end end ) Link to comment
فاّرس Posted March 29, 2014 Share Posted March 29, 2014 marker = createMarker ( x, y, z, "cylinder", size, r, b, g, alpha ) local = mx, my, mz = احداثياتك addEventHandler( "onMarkerHit", marker, function ( element ) if getElementType ( element ) == "player" and isPedInVehicle ( element ) and getElementData ( element, "gang" ) == "اسم العصابة" and getTeamName ( getPlayerTeam ( source ) ) == "اسم التيم" then setElementPosition ( element, mx, my, mz ) end end ) .ناقصك تتحقق ان اللاعب داخل تيم بالاساس 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