Jump to content

وظيفه لسياره محدده


Saud

Recommended Posts

سلام عليكم ورحمة الله وبركاته

: سويت هالكود

local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150)  
  
function WL (hitPlayer, matchingDimension) 
    if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and getPedOccupiedVehicle(hitPlayer) then 
    outputChatBox ( "Welcome", getRootElement(), 255, 255, 255, false ) 
    end 
end 
addEventHandler( "onMarkerHit", Marker, WL ) 

وشغال تمام لكن يوم اضفتله وصار كذا خرب

local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150)  
  
function WL (hitPlayer, matchingDimension,thevehicle) 
    if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and getPedOccupiedVehicle(hitPlayer) then 
        if getElementModel ( thevehicle) == 510 then 
            outputChatBox ( "Welcome", getRootElement(), 255, 255, 255, false ) 
        end 
    end 
end 
addEventHandler( "onMarkerHit", Marker, WL ) 

غيرت وحست لكن ماش ماقدر تاضبط الموضوع

طبعا انا ابيه اذا كان مع اللاعب السيكل اللي الاي دي حقه (510) تشتغل الوظيفه واذا كان معه سياره غيره مايشتغل

Link to comment
    local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150) 
     
  
function WL (hitPlayer, matchingDimension) 
    if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and isPedInVehicle(hitPlayer) then 
        local vehicle = getPedOccupiedVehicle(hitPlayer) 
        if ( getElementModel(vehicle) == 510 ) then  
            outputChatBox ( "Welcome", hitPlayer, 255, 255, 255, false ) 
        else 
           outputChatBox("You don't have the required model ", hitPlayer,255,255,255,false) 
        end 
    end 
end 
addEventHandler( "onMarkerHit", Marker, WL ) 

إذا تريد عندما يدخل فالماركر بدون السيكل ، لا يريه النص إستخدم هذه

    local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150) 
     
  
function WL (hitPlayer, matchingDimension) 
    if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and isPedInVehicle(hitPlayer) then 
        local vehicle = getPedOccupiedVehicle(hitPlayer) 
        if ( getElementModel(vehicle) == 510 ) then  
            outputChatBox ( "Welcome", hitPlayer, 255, 255, 255, false ) 
        else 
           return false  
        end 
    end 
end 
addEventHandler( "onMarkerHit", Marker, WL ) 

Link to comment
  • Other Languages Moderators

إذا تريد عندما يدخل فالماركر بدون السيكل ، لا يريه النص إستخدم هذه

    local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150) 
     
  
function WL (hitPlayer, matchingDimension) 
    if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and isPedInVehicle(hitPlayer) then 
        local vehicle = getPedOccupiedVehicle(hitPlayer) 
        if ( getElementModel(vehicle) == 510 ) then  
            outputChatBox ( "Welcome", hitPlayer, 255, 255, 255, false ) 
        else 
           return false  
        end 
    end 
end 
addEventHandler( "onMarkerHit", Marker, WL ) 

else من الأساس ما تحتاج

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