KasaNoVa Posted August 12, 2014 Posted August 12, 2014 اريد كود سيارات ممنوع يركبها غير الشرطة يا ريت لو الكود جاهز و انا اعدل عليه
K1NG Posted August 12, 2014 Posted August 12, 2014 اريد كود سيارات ممنوع يركبها غير الشرطة يا ريت لو الكود جاهز و انا اعدل عليه https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter شوف المثال ^
nxFairlywell Posted August 12, 2014 Posted August 12, 2014 getElementsByType triggerServerEvent aclGetGroup ---- اذا كان بالرتب isPlayerInTeam ---- اذا كان بـ تيم setVehicleLocked
KasaNoVa Posted August 12, 2014 Author Posted August 12, 2014 اريد كود سيارات ممنوع يركبها غير الشرطة يا ريت لو الكود جاهز و انا اعدل عليه https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter شوف المثال ^ حضرتك ده مش بيعرف مين في التيم و مين لا لو تعرف تعملهولي اعملو
#DRAGON!FIRE Posted August 12, 2014 Posted August 12, 2014 addEventHandler("onVehicleStartEnter",Car,function(plr) if getElementData(plr,'Group') ~= 'اسم القروب' then cancelEvent() end end )
K1NG Posted August 12, 2014 Posted August 12, 2014 اريد كود سيارات ممنوع يركبها غير الشرطة يا ريت لو الكود جاهز و انا اعدل عليه https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter شوف المثال ^ حضرتك ده مش بيعرف مين في التيم و مين لا لو تعرف تعملهولي اعملو هذا الكود يتحقق من شخصيات الشرطة .. واشوفك كاتب بموضوعك انك تبي جاهز ثم تعدل عليه :الزبدة استخدم getPlayerTeam getTeamName addEventHandler("onVehicleStartEnter",Car,function(plr) if getElementData(plr,'Group') ~= 'اسم القروب' then cancelEvent() end end ) ??
#DRAGON!FIRE Posted August 12, 2014 Posted August 12, 2014 طرحت كود مطروح مسبقأ ما اعطيه ليه . ثانيا ممكن الشرطة تكون بقروب اسل .. ع العموم عطيته الكود وهو يسويه بالشكل المناسب له .
KasaNoVa Posted August 12, 2014 Author Posted August 12, 2014 انا عملت الكود بس مش عارف صح ولا لا شوفو policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } function PoliceVehicle(player) local Policeteam = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) if (policeVehicles[getElementModel(source)]) and (Policeteam ~= "Police") then removePedFromVehicle(player) outputChatBox("Only policeman can enter police cars!", player) end end addEventHandler("onVehicleEnter", root, PoliceVehicle)
#DRAGON!FIRE Posted August 12, 2014 Posted August 12, 2014 vehicle = { [598]=true, [596]=true, [597]=true, [599]=true } addEventHandler( "onVehicleStartEnter", root, function ( player ) if ( getPlayerTeam ( player ) and getPlayerTeam ( player ) ~= getTeamFromName ( "Police" ) ) then if ( vehicle [ getElementModel ( source ) ] ) then cancelEvent ( ) end end end )
KasaNoVa Posted August 12, 2014 Author Posted August 12, 2014 vehicle = { [598]=true, [596]=true, [597]=true, [599]=true } addEventHandler( "onVehicleStartEnter", root, function ( player ) if ( getPlayerTeam ( player ) and getPlayerTeam ( player ) ~= getTeamFromName ( "Police" ) ) then if ( vehicle [ getElementModel ( source ) ] ) then cancelEvent ( ) end end end ) متشكر
K1NG Posted August 12, 2014 Posted August 12, 2014 vehicle = { [598]=true, [596]=true, [597]=true, [599]=true } addEventHandler( "onVehicleStartEnter", root, function ( player ) if ( getPlayerTeam ( player ) and getPlayerTeam ( player ) ~= getTeamFromName ( "Police" ) ) then if ( vehicle [ getElementModel ( source ) ] ) then cancelEvent ( ) end end end ) . يُفضل تخلي التحقق الثاني مكان التحقق الأول والأول مكان الثاني
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