Jump to content

طلب كود


Recommended Posts

setElementPosition -- عشان تنقل السياره 

: هذا مثال على الفنكشن الي فوق ونفس طلبك : )

local Marker = createMarker ( ... ) 
  
addEventHandler ( "onMarkerHit", resourceRoot, function ( Vehicle ) 
    if ( getElementType ( Vehicle ) == "vehicle" ) and ( source == Marker ) then 
    setElementPosition ( Vehicle, x, y, z ) 
    end 
end ) 
Link to comment

^ جربته و ظبط

  
local Marker = createMarker ( ........... ) 
  
addEventHandler ( "onMarkerHit",Marker, function (player) 
    if ( getPedOccupiedVehicle(player) ) then 
    setElementPosition (getPedOccupiedVehicle(player),x,y,z ) 
    end 
end ) 

Link to comment
^ جربته و ظبط
  
local Marker = createMarker ( ........... ) 
  
addEventHandler ( "onMarkerHit",Marker, function (player) 
    if ( getPedOccupiedVehicle(player) ) then 
    setElementPosition (getPedOccupiedVehicle(player),x,y,z ) 
    end 
end ) 

يبب شُُكرا يا المدبع أشتغل شكررررررررررررررررررررررررررررررررررررررررررررررررررررررررررررررا

Link to comment
نفس كودي وما شتغل ^

الكود انا مسويه ومجربه شغال تمام ولا فيه اي خطأ

تأكد انك حاطه من جانب سيرفر وتاكد من ملف الميتا

, اهم شيء تم الافادهه ^_^

Link to comment
local marker = createMarker(x, y, z, "cylinder", 1.5, 0, 0, 0) 
  
addEventHandler("onMarkerHit", marker, function(element) 
    if getElementType(element) == "player" then 
        local vehicle = getPedOccupiedVehicle(element) 
        local isDriver = vehicle and getVehicleController(vehicle) == element 
        setElementPosition(isDriver and vehicle or element, x, y, z) 
    end 
end) 

Edited by Guest
Link to comment
  • Other Languages Moderators
local marker = createMarker(x, y, z, "cylinder", 1.5, 0, 0, 0) 
  
addEventHandler("onMarkerHit", marker, function(element) 
    if getElementType(element) == "player" then 
        local vehicle = getPedOccupiedVehicle(localPlayer) 
        local isDriver = vehicle and getVehicleController(vehicle) == element 
        setElementPosition(isDriver and vehicle or element, x, y, z) 
    end 
end) 

localPlayer -> element

Link to comment
local marker = createMarker(x, y, z, "cylinder", 1.5, 0, 0, 0) 
  
addEventHandler("onMarkerHit", marker, function(element) 
    if getElementType(element) == "player" then 
        local vehicle = getPedOccupiedVehicle(localPlayer) 
        local isDriver = vehicle and getVehicleController(vehicle) == element 
        setElementPosition(isDriver and vehicle or element, x, y, z) 
    end 
end) 

localPlayer -> element

معليش غلط مطبعي

Link to comment
ياخذ الكود الاسهل له

هو قال اذ الاعب في الموتر ينقله او اذ كان كعابي ينقله

يعني اذ في السيارة ينقل السيارة واذ يمشي بدون سيارة ينقله

بس هم الله يهديهم مايفهمون زين اللي حاطين الاكواد

ونصها مشطوبة

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