Jump to content

مساعده


Recommended Posts

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

انا اريد اعمل نيون يعني ابي اعرف اربط الماركر تحت السياره + يشتغل الماركر عند ضغط الزر ومشكورين

ياريت ماكان الطلب طويل :D

Link to comment

مشكورين سويت الي اقدر عليه

  
  
  
function MarkerHat(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then 
    local Marker = createMarker ( x, y, z, "arrow", 5, 255, 0, 0, 170 ) 
    Marker = createVehicle ( ID, x, y, z + 5 ) 
    attachElements ( Marker, Vehicle, x, y, 2 ) 
    local anotherguy = getPlayerFromName ( "anotherguy" ) 
    setElementVisibleTo ( Marker, anotherguy, true ) 
     end 
end 
    addEventHandler("onClientGUIClick", root, Marker, MarkerHat, anotherguy ) 
  
  
  

Link to comment
  
  
function MarkerHat(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then 
    local Marker = createMarker ( x, y, z, "arrow", 5, 255, 0, 0, 170 ) 
    local ID, x, y, z = Marker = createVehicle ( ID, x, y, z + 5 ) 
    attachElements ( Marker, Vehicle, x, y, 2 ) 
    local anotherguy = getPlayerFromName ( "anotherguy" ) 
    setElementVisibleTo ( Marker, anotherguy, true ) 
     end 
end 
    addEventHandler("onClientGUIClick", root, Marker, MarkerHat, anotherguy ) 
  

هاادا الي تقصده يعناد ؟

Edited by Guest
Link to comment
  
  
function MarkerHat(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then 
    local Marker = createMarker ( x, y, z, "arrow", 5, 255, 0, 0, 170 ) 
    local x, y, z = Marker = createVehicle ( ID, x, y, z + 5 ) 
    attachElements ( Marker, Vehicle, x, y, 2 ) 
    local anotherguy = getPlayerFromName ( "anotherguy" ) 
    setElementVisibleTo ( Marker, anotherguy, true ) 
     end 
end 
    addEventHandler("onClientGUIClick", root, Marker, MarkerHat, anotherguy ) 
  

هاادا الي تقصده يعناد ؟

غلط X غلط

شوف التعليق الي فوق

Link to comment
طيب قولي وش الغلط وبحاول اصلحه :)

ذا إيشش ؟؟

local x, y, z = Marker = createVehicle ( ID, x, y, z + 5 ) 

debugscript 3 أنت لآزمم تججربه بـ سيرفر و تششوف الأخططاء في

و تححآول تصلحه بـ نفسسكـ

وإذا كآن ششيء صعب تفضضل هنا

Link to comment
طيب قولي وش الغلط وبحاول اصلحه :)

ذا إيشش ؟؟

local x, y, z = Marker = createVehicle ( ID, x, y, z + 5 ) 

debugscript 3 أنت لآزمم تججربه بـ سيرفر و تششوف الأخططاء في

و تححآول تصلحه بـ نفسسكـ

وإذا كآن ششيء صعب تفضضل هنا

:roll: اوك

Link to comment
مشكورين سويت الي اقدر عليه
  
  
  
function MarkerHat(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then 
    local Marker = createMarker ( x, y, z, "arrow", 5, 255, 0, 0, 170 ) 
    Marker = createVehicle ( ID, x, y, z + 5 ) 
    attachElements ( Marker, Vehicle, x, y, 2 ) 
    local anotherguy = getPlayerFromName ( "anotherguy" ) 
    setElementVisibleTo ( Marker, anotherguy, true ) 
     end 
end 
    addEventHandler("onClientGUIClick", root, Marker, MarkerHat, anotherguy ) 
  
  
  

اخوي الاغلاط الي ب كودك كثيره

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

local root = getRootElement() 
function onClick(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي 
    local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب 
    local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر 
-- x,y,z مكان الماركر 
-- 5  حجم الماركر 
-- 255 اللون الاحمر 
-- 0 اللون الاخضر 
-- 0 اللون الازرق 
-- 170 الوضوح 
    Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب 
    attachElements ( Marker, Vehicle, 0, 0, 0 ) -- ربط الماركر بالسيارة 
    setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر 
     end 
end 
addEventHandler("onClientGUIClick", root,onClick) 

ملاحظة انا مبرمج مبتدىء هاذي مساعدة بسيطه لين يجي مبرمج محترف ويساعدك إذا لزم الامر

Link to comment

اخوي الاغلاط الي ب كودك كثيره

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

local root = getRootElement() 
function onClick(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي 
    local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب 
    local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر 
-- x,y,z مكان الماركر 
-- 5  حجم الماركر 
-- 255 اللون الاحمر 
-- 0 اللون الاخضر 
-- 0 اللون الازرق 
-- 170 الوضوح 
    Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب 
    attachElements ( Marker, Vehicle, 0, 0, 0 ) -- ربط الماركر بالسيارة 
    setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر 
     end 
end 
addEventHandler("onClientGUIClick", root,onClick) 

ملاحظة انا مبرمج مبتدىء هاذي مساعدة بسيطه لين يجي مبرمج محترف ويساعدك إذا لزم الامر

والله ماقصرت خويا جميل وممتاز جدا لاكن واحد يصحح ويخليه تحت السياره

Link to comment

اخوي الاغلاط الي ب كودك كثيره

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

local root = getRootElement() 
function onClick(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي 
    local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب 
    local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر 
-- x,y,z مكان الماركر 
-- 5  حجم الماركر 
-- 255 اللون الاحمر 
-- 0 اللون الاخضر 
-- 0 اللون الازرق 
-- 170 الوضوح 
    Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب 
    attachElements ( Marker, Vehicle, 0, 0, 0 ) -- ربط الماركر بالسيارة 
    setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر 
     end 
end 
addEventHandler("onClientGUIClick", root,onClick) 

ملاحظة انا مبرمج مبتدىء هاذي مساعدة بسيطه لين يجي مبرمج محترف ويساعدك إذا لزم الامر

والله ماقصرت خويا جميل وممتاز جدا لاكن واحد يصحح ويخليه تحت السياره

local root = getRootElement() 
function onClick(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي 
    local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب 
    local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر 
-- x,y,z مكان الماركر 
-- 5  حجم الماركر 
-- 255 اللون الاحمر 
-- 0 اللون الاخضر 
-- 0 اللون الازرق 
-- 170 الوضوح 
    Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب 
    attachElements ( Marker, Vehicle, 0, 0, -5 ) -- ربط الماركر بالسيارة 
    setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر 
     end 
end 
addEventHandler("onClientGUIClick", root,onClick) 

هذا يخليه تحت السيارة, بس ما جربته

عالعموم

هذي الي غيرتها في الكود كله

attachElements ( Marker, Vehicle, 0, 0, -5 ) 

Link to comment

اخوي الاغلاط الي ب كودك كثيره

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

local root = getRootElement() 
function onClick(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي 
    local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب 
    local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر 
-- x,y,z مكان الماركر 
-- 5  حجم الماركر 
-- 255 اللون الاحمر 
-- 0 اللون الاخضر 
-- 0 اللون الازرق 
-- 170 الوضوح 
    Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب 
    attachElements ( Marker, Vehicle, 0, 0, 0 ) -- ربط الماركر بالسيارة 
    setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر 
     end 
end 
addEventHandler("onClientGUIClick", root,onClick) 

ملاحظة انا مبرمج مبتدىء هاذي مساعدة بسيطه لين يجي مبرمج محترف ويساعدك إذا لزم الامر

والله ماقصرت خويا جميل وممتاز جدا لاكن واحد يصحح ويخليه تحت السياره

local root = getRootElement() 
function onClick(button, state, absoluteX, absoluteY) 
     if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي 
    local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب 
    local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر 
-- x,y,z مكان الماركر 
-- 5  حجم الماركر 
-- 255 اللون الاحمر 
-- 0 اللون الاخضر 
-- 0 اللون الازرق 
-- 170 الوضوح 
    Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب 
    attachElements ( Marker, Vehicle, 0, 0, -5 ) -- ربط الماركر بالسيارة 
    setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر 
     end 
end 
addEventHandler("onClientGUIClick", root,onClick) 

هذا يخليه تحت السيارة, بس ما جربته

عالعموم

هذي الي غيرتها في الكود كله

attachElements ( Marker, Vehicle, 0, 0, -5 ) 

ماينفع يختفي

Link to comment

أفضل حل

function attachMarkerToVehicle ( theVehicle ) 
    -- create the marker to attach 
    local arrowMarker = createMarker ( 0, 0, 0, "arrow", 1.5, 0, 0, 255, 255 ) 
    -- attach the marker above the vehicle 
    attachElements ( arrowMarker, theVehicle, 0, 0, 2 ) 
    -- add an event handler for when the vehicle blows up 
    addEventHandler ( "onVehicleExplode", theVehicle, onMarkedCarExplode ) 
end 
  
function onMarkedCarExplode () 
    -- get the elements attached to the vehicle 
    local attachedElements = getAttachedElements ( source ) 
    -- loop through the table of elements 
    for i,v in ipairs ( attachedElements ) do 
        -- detach the element from the vehicle 
        detachElements ( v, source ) 
    end 
    -- remove the event handler 
    removeEventHandler ( "onVehicleExplode", source, onMarkedCarExplode ) 
end 

للمعلومية

جايبها من

detachElements

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