Jump to content

ممكن كود


Recommended Posts

اريد كود سيارات ممنوع يركبها غير الشرطة يا ريت لو الكود جاهز و انا اعدل عليه

https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter

شوف المثال ^

حضرتك ده مش بيعرف مين في التيم و مين لا لو تعرف تعملهولي اعملو

هذا الكود يتحقق من شخصيات الشرطة .. واشوفك كاتب بموضوعك انك تبي جاهز ثم تعدل عليه

:الزبدة استخدم

getPlayerTeam 
getTeamName 

addEventHandler("onVehicleStartEnter",Car,function(plr) 
    if getElementData(plr,'Group') ~= 'اسم القروب' then 
        cancelEvent() 
        end 
    end 
) 

??

Link to comment

انا عملت الكود بس مش عارف صح ولا لا

شوفو

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) 

Link to comment

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 ) 
Link to comment
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 ) 

متشكر

Link to comment
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 ) 

. يُفضل تخلي التحقق الثاني مكان التحقق الأول والأول مكان الثاني

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...