Jump to content

طلب كود


AL-SAYED

Recommended Posts

جرب هذا

--Server Side

function v( thePlayer ) 
    local ID = getElementModel(getPedOccupiedVehicle(thePlayer)) 
    if ( ID == 000) then--ركب اي دي السياره لشرطه بدل 000 
    if ( getTeamName ==  name) then--name ضع اسم التيم الشرطه بدل 
        setElementHealth ( source, getElementHealth(source) - 100 ) 
end 
end 
end 
addEventHandler("onVehicleEnter",root,v) 

او

function v( thePlayer ) 
    local ID = getElementModel(getPedOccupiedVehicle(thePlayer)) 
    if ( ID == 000) then--ركب اي دي السياره لشرطه بدل 000 
    if ( getTeamName ==  name) then--name ضع اسم التيم الشرطه بدل 
        setElementHealth ( thePlayer, getElementHealth(thePlayer) - 100 ) 
end 
end 
end 
addEventHandler("onVehicleEnter",root,v) 

Link to comment
  • Other Languages Moderators
policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } -- آرقام سيارات الشرطة 
  
function enterVehicle(player) 
     local Team = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) 
     if (policeVehicles[getElementModel(source)]) and (Team ~= "Police") then 
          removePedFromVehicle(player) 
          outputChatBox("Only policeman can enter police cars!", player) 
     end 
end 
addEventHandler("onVehicleEnter", root, enterVehicle) 

Link to comment

معليش كنت مستعجل جرب هذا

function planeEnter ( theVehicle, seat, jacked ) 
local NameTeam = getTeamFromName ( "a" )--بأسم قروب الحراميه  a استبدل 
if NameTeam then 
local id = getElementModel ( theVehicle )  
if id == 000 then --استبدل 000 بأيدي السياره 
blowVehicle ( theVehicle ) 
end 
end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), planeEnter ) 

واذا اكثر من سياره

function planeEnter ( theVehicle, seat, jacked ) 
local NameTeam = getTeamFromName ( "a" )--بأسم قروب الحراميه  a استبدل 
if NameTeam then 
local id = getElementModel ( theVehicle )  
if id == 000 or id == 000 or id == 000 or id == 000 then--استبدل 000 بأيدي السياره 
blowVehicle ( theVehicle ) 
end 
end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), planeEnter ) 

Link to comment

اذا تبيها تنسحب تفضل

--server side--

function planeEnter ( theVehicle, seat, jacked) 
local NameTeam = getTeamFromName ( "a" )--بأسم قروب الحراميه  a استبدل 
if NameTeam then 
local id = getElementModel ( theVehicle ) 
if id == 000 or id == 000 or id == 000  then--استبدل 000 بأيدي السياره 
destroyElement(theVehicle) 
end 
end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), planeEnter ) 

--meta--


Link to comment
policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } -- آرقام سيارات الشرطة 
  
function enterVehicle(player) 
     local Team = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) 
     if (policeVehicles[getElementModel(source)]) and (Team ~= "Police") then 
          removePedFromVehicle(player) 
          outputChatBox("Only policeman can enter police cars!", player) 
     end 
end 
addEventHandler("onVehicleEnter", root, enterVehicle) 

وين احط القوس

policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } -- آرقام سيارات الشرطة 
  
function enterVehicle(player) 
     (local Team = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) 
     if (policeVehicles[getElementModel(source)]) and (Team ~= "Police") then 
          removePedFromVehicle(player) 
          outputChatBox("Only policeman can enter police cars!", player) 
     end 
end 
addEventHandler("onVehicleEnter", root, enterVehicle) 

Link to comment
  • Other Languages Moderators
policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } -- آرقام سيارات الشرطة 
  
function enterVehicle(player) 
     local Team = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) 
     if (policeVehicles[getElementModel(source)]) and (Team ~= "Police") then 
          removePedFromVehicle(player) 
          outputChatBox("Only policeman can enter police cars!", player) 
     end 
end 
addEventHandler("onVehicleEnter", root, enterVehicle) 

جرب

Link to comment
policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } -- آرقام سيارات الشرطة 
  
function enterVehicle(player) 
     local Team = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) 
     if (policeVehicles[getElementModel(source)]) and (Team ~= "Police") then 
          removePedFromVehicle(player) 
          outputChatBox("Only policeman can enter police cars!", player) 
     end 
end 
addEventHandler("onVehicleEnter", root, enterVehicle) 

جرب

بس هالكود راح يدخل الاعب في سيارة البوليس ما راح يمنعه .. راح يطلع له بالشات

Only policeman can enter police cars!

بس

الأفضل

policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } -- آرقام سيارات الشرطة 
  
function enterVehicle(player) 
     local Team = getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) 
     if (policeVehicles[getElementModel(source)]) and (Team ~= "Police") then 
          removePedFromVehicle(player) 
          cancelEvent() 
          outputChatBox("Only policeman can enter police cars!", player) 
     end 
end 
addEventHandler("onVehicleEnter", root, enterVehicle) 

Link to comment
  • Other Languages Moderators

لا يا عزيزي

بيركب السيارة و تلقائياً بيخرج منها

لان الكود ذا موجود

removePedFromVehicle(player) 

Link to comment
  • Other Languages Moderators
لا يا عزيزي

بيركب السيارة و تلقائياً بيخرج منها

لان الكود ذا موجود

removePedFromVehicle(player) 

ايه بس

cancelEvent 

الأفضل ...

cancelEvent جرب بـ

:wink: وقل لي أيش يصير معك

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...