Jump to content

وين الغلط ؟


Recommended Posts

هلا وين الغلط بالكودين انا انلحست صراحه

GUIEditor = { 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(353, 234, 340, 296, "", false,btn) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        btn = guiCreateButton(109, 66, 101, 36, "adw", false, GUIEditor.window[1])     
    end 
) 
  
function ma() 
  
           x,y,z = getElementPosition( localPlayer ) 
            
           marker = createMarker ( x, y, z, "cylinder", 1.0, 0, 0, 255,255 ) 
        
end 
  
addEventHandler ( "onClientGUIClick", ma, btn, false ) 

الميتا

     "Monster" type="script" name="Scriptm" description="Mao" /> 
  

Link to comment
GUIEditor = { 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(353, 234, 340, 296, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        btn = guiCreateButton(109, 66, 101, 36, "adw", false, GUIEditor.window[1])     
    end 
) 
  
function ma() 
    x,y,z = getElementPosition( localPlayer )                
    marker = createMarker ( x, y, z, "cylinder", 1.0, 0, 0, 255,255 ) 
end 
addEventHandler ( "onClientGUIClick", ma, btn, false ) 

عندك الكود هذا

GUIEditor.window[1] = guiCreateWindow(353, 234, 340, 296, "",  false,btn) 

خليته كذا

GUIEditor.window[1] = guiCreateWindow(353, 234, 340, 296, "",  false) 

Link to comment
GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) -- كود قفل النافذه وفتحها تقدر تغير الزر زي ماتبي 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot,  
    function (     ) -- حدث عند الضغط على الزر + وظيفه 
        if ( source == Button ) then -- اذا ضغط الزر 
        local x, y, z = getElementPosition ( localPlayer ) -- نجيب احداثيات الاعب 
        createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) -- ونسوي في مكانه ماركر 
    end 
end )-- اند الفنكشن وقوس الحدث 

Edited by Guest
Link to comment

GUIEditor = { 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(353, 234, 340, 296, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        btn = guiCreateButton(109, 66, 101, 36, "adw", false, GUIEditor.window[1])     
    end 
) 
  
addEventHandler ( "onClientGUIClick",btn, 
function () 
   local x,y,z = getElementPosition( localPlayer )               
    createMarker ( x, y, z, "cylinder", 1.0, 0, 0, 255,255 ) 
end,false 
) 
Link to comment
ولا كود ضبطط

السكربت بإختصار ابيه يجيب مكان الاعب ويعطيه ماركر بمكانه ااذا ضغط الزر :(

! شف كودي شغال

واذا واجهت اغلاط شف الدي بوق وش يقول

debugscript 3

Link to comment
GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) -- كود قفل النافذه وفتحها تقدر تغير الزر زي ماتبي 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot,  
    function (     ) -- حدث عند الضغط على الزر + وظيفه 
        if ( source == Button ) then -- اذا ضغط الزر 
        local x, y, z = getElementPosition ( localPlayer ) -- نجيب احداثيات الاعب 
        createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) -- ونسوي في مكانه ماركر 
end )-- اند الفنكشن وقوس الحدث 

كفوو ضبط بس انك نسيت تحط اند الإف

Link to comment
GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) -- كود قفل النافذه وفتحها تقدر تغير الزر زي ماتبي 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot,  
    function (     ) -- حدث عند الضغط على الزر + وظيفه 
        if ( source == Button ) then -- اذا ضغط الزر 
        local x, y, z = getElementPosition ( localPlayer ) -- نجيب احداثيات الاعب 
        createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) -- ونسوي في مكانه ماركر 
end )-- اند الفنكشن وقوس الحدث 

كفوو ضبط بس انك نسيت تحط اند الإف

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

حياك الله : )

Link to comment
GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) -- كود قفل النافذه وفتحها تقدر تغير الزر زي ماتبي 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot,  
    function (     ) -- حدث عند الضغط على الزر + وظيفه 
        if ( source == Button ) then -- اذا ضغط الزر 
        local x, y, z = getElementPosition ( localPlayer ) -- نجيب احداثيات الاعب 
        createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) -- ونسوي في مكانه ماركر 
end )-- اند الفنكشن وقوس الحدث 

كفوو ضبط بس انك نسيت تحط اند الإف

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

حياك الله : )

معليش تعبتك بس شوف حاولت اعدل واخلي اذا صقع الاعب الماركر يعطيه سياره

GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    )  
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot, 
    function (     )  
        if ( source == Button ) then  
        local x, y, z = getElementPosition ( localPlayer )  
        local mymarker = createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) 
        createBlipAttachedTo (mymarker, 25, 2, 255, 0, 0,255, 0, 99999.0 ) 
end 
        end ) 
         
addEventHandler ( "onClientMarkerHit", getRootElement(), 
    function() 
    if ( source == mymarker ) then  
    local car = createVehicle ( 432, x, y, z ) 
    warpPedIntoVehicle ( localPlayer, car )   
     
end 
  
end) 
     

Link to comment

#Server

local Vehicle = {    }; 
  
addEvent ( "GiveCar", true ) 
addEventHandler ( "GiveCar", root, function (    ) 
    if ( isElement ( Car[Vehicle] ) ) then 
        destroyElement ( Car[Vehicle] ) 
    end 
    local x, y, z = getElementPosition ( source ) 
    Vehicle[source] = createVehicle ( 411, x, y, z ) 
    warpPedIntoVehicle ( source, Vehicle[source] ) 
    end 
end ) 
  
addEventHandler ( "onVehicleExplode", resourceRoot, function (    ) 
    if ( isElement ( Vehicle[source] ) ) then 
        destroyElement ( Vehicle[source] ) 
    Vehicle[source] = nil 
    end 
end ) 
  
addEventHandler ( "onPlayerQuit", resourceRoot, function (    ) 
    if ( isElement ( Vehicle[source] ) ) then 
        destroyElement ( Vehicle[source] ) 
    Vehicle[source] = nil 
    end 
end ) 

#Client

GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot, 
    function (     ) 
        if ( source == Button ) then 
        local x, y, z = getElementPosition ( localPlayer ) 
        Marker = createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) 
        triggerServerEvent ( "GiveCar", localPlayer ) 
    end 
end ) 

Edited by Guest
Link to comment

شكله فيه مسابقة طرح اكواد بالموضوع

#Server
local Vehicle = {    }; 
  
addEvent ( "GiveCar", true ) 
addEventHandler ( "GiveCar", root, function ( Marker ) 
    if ( isElement ( Car ) ) then 
            destroyElement ( Car ) 
        end 
    else 
    local x, y, z = getElementPosition ( source ) 
    Car[Vehicle] = createVehicle ( 411, x, y, z ) 
    warpPedIntoVehicle ( source, Car[Vehicle] ) 
    if ( isPedInVehicle ( source ) ) then 
    destroyElement ( Marker ) 
    end 
end ) 
  
addEventHandler ( "onVehicleExplode", resourceRoot, function (    ) 
    if ( isElement ( Car[Vehicle] ) ) then 
        destroyElement ( Car[Vehicle] ) 
    Car[Vehicle] = nil 
    end 
end ) 
  
addEventHandler ( "onPlayerQuit", resourceRoot, function (    ) 
    if ( isElement ( Car[Vehicle] ) ) then 
        destroyElement ( Car[Vehicle] ) 
    Car[Vehicle] = nil 
    end 
end ) 

#Client

GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot, 
    function (     ) 
        if ( source == Button ) then 
        local x, y, z = getElementPosition ( localPlayer ) 
        Marker = createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) 
    end 
end ) 
  
addEventHandler ( "onClientMarkerHit", resourceRoot,  
function ( player ) 
    if ( player == localPlayer ) and ( source == Marker ) then 
        triggerServerEvent ( "GiveCar", localPlayer, Marker ) 
    end 
end ) 

كودك مليان اخطاء

اول شي المنت الماركر الي مسويه بالكلينت ما رح يتعرف عليه السيرفر ف كيف انت تسوي له دستروي بالسيرفر؟ + ما اشوف احد بالموضوع قال يبي يحذف الماركر

بالسيرفر سايد:

من سطر 5 إلى 7 هريس

في سطر 8 بدون ما يكون فيه شرط else حاط

Car + Vehicle في سطر 10 - 25 - 26 - 27 جايب العيد ب اسم الجدول و المفتاح

Link to comment

^

ياخوي اعصابك :lol:

روق روق

, صلحت الاخطاء على كلامك مم قصرت ع التوضيح ^^

مافيه مسابقه ولا شيء الرجال قال معليش تعبتك معي بس ابي مساعدتك بعد

وساعدته

+ ماشوف غلط ب اسم السياره والجدول واذا فيه غلط وضحه لاهنت

وبالنسبه ل اختفاء الماركر بعد ماياخذ سياره مجرد اضافه عشان م يبقى الماركر بس

Link to comment
#Server
local Vehicle = {    }; 
  
addEvent ( "GiveCar", true ) 
addEventHandler ( "GiveCar", root, function (    ) 
    if ( isElement ( Car[Vehicle] ) ) then 
        destroyElement ( Car[Vehicle] ) 
    else 
    local x, y, z = getElementPosition ( source ) 
    Car[Vehicle] = createVehicle ( 411, x, y, z ) 
    warpPedIntoVehicle ( source, Car[Vehicle] ) 
    end 
end ) 
  
addEventHandler ( "onVehicleExplode", resourceRoot, function (    ) 
    if ( isElement ( Car[Vehicle] ) ) then 
        destroyElement ( Car[Vehicle] ) 
    Car[Vehicle] = nil 
    end 
end ) 
  
addEventHandler ( "onPlayerQuit", resourceRoot, function (    ) 
    if ( isElement ( Car[Vehicle] ) ) then 
        destroyElement ( Car[Vehicle] ) 
    Car[Vehicle] = nil 
    end 
end ) 

#Client

GUIEditor = { window = {    } } 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (     ) 
    Window = guiCreateWindow ( 353, 234, 340, 296, "Hello", false ) 
    guiWindowSetSizable ( Window, false ) 
    guiSetVisible ( Window, false ) 
    Button = guiCreateButton ( 109, 66, 101, 36, "Hello", false, Window )     
end ) 
  
bindKey ( "F5", "down", function (    ) 
      guiSetVisible ( Window, not guiGetVisible ( Window ) ) 
      showCursor ( guiGetVisible ( Window ) ) 
end ) 
  
addEventHandler ( "onClientGUIClick", resourceRoot, 
    function (     ) 
        if ( source == Button ) then 
        local x, y, z = getElementPosition ( localPlayer ) 
        Marker = createMarker ( x, y, z, "cylinder", 1, 0, 255, 0 ) 
        triggerServerEvent ( "GiveCar", localPlayer ) 
    end 
end ) 

    local Vehicle = {    }; 
      
    addEvent ( "GiveCar", true ) 
    addEventHandler ( "GiveCar", root, function (    ) 
        if ( isElement ( Vehicle[source] ) ) then 
            destroyElement ( Vehicle[source] ) 
        else 
        local x, y, z = getElementPosition ( source ) 
        Vehicle[source] = createVehicle ( 411, x, y, z ) 
        warpPedIntoVehicle ( source, Vehicle[source] ) 
        end 
    end ) 
      
    addEventHandler ( "onVehicleExplode", resourceRoot, function (    ) 
        if ( isElement ( Vehicle[source] ) ) then 
            destroyElement ( Vehicle[source] ) 
        Vehicle[source] = nil 
        end 
    end ) 
      
    addEventHandler ( "onPlayerQuit", resourceRoot, function (    ) 
        if ( isElement ( Vehicle[source] ) ) then 
            destroyElement ( Vehicle[source] ) 
        Vehicle[source] = nil 
        end 
    end ) 

Link to comment

@xClassiCx

الي بسطر 7 ما لها داعي المفروض تحط الأند مكانها else

+

هو السيارة الي انفجرت onVehicleExplode السورس في الحدث

Vehicle انت استخدمت اللاعب كـ مقتاح في الجدول

Link to comment
local Vehicle = {    }; 
          
addEvent ( "GiveCar", true ) 
addEventHandler ( "GiveCar", root, function (    ) 
    if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) end 
        local x, y, z = getElementPosition ( source ) 
        Vehicle[source] = createVehicle ( 411, x, y, z ) 
        warpPedIntoVehicle ( source, Vehicle[source] ) 
        end 
    end  
) 
          
addEventHandler("onVehicleExplode", resourceRoot, 
function() 
    setTimer(destroyElement, 2500, 1, source)   
end) 
          
addEventHandler ( "onPlayerQuit", resourceRoot, function (    ) 
    if ( isElement ( Vehicle[source] ) ) then 
        destroyElement ( Vehicle[source] ) 
        Vehicle[source] = nil 
        end 
    end  
) 

كذا صح؟

معليش ع الخطاء

, ومشكور تآبل عآلتصحيح :D

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