Jump to content

طلب شرح


Recommended Posts

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

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

الي هو تختار منها اشياء

شلون اخليه يختار شخصيات و الخ ...

لاني نوب فيها بمعنى الكلمة .!! ذذ

و لو ابغي اخلي سيارات في قريد لست

بدون اسمائهم الي في العبه مثلا اخلي

سطر الايدي مالها او اسمهم

بدون ما استخدم

getVehicleNameFromID 

ابيه

Car1 565

Car2 343

مثل كذا في القريد لست

اتمنى فهمتون طلبي :@

Link to comment
سوي جدول وحط فيه الأيديات اللي تبيها

( columen ) بعدين سوي جريد فيه عمودين

id والثاني الآيدي car1 وحط في الأول

مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل :

-- # Client Side ~ : 
  
aCars = { 
    { 'Car [1]',411 }, 
    { 'Vehicle [2]',429 }, 
} 
  
for _,v in ipairs ( aCars ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',MyButton, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
        end 
    end,false 
) 

الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ

Link to comment
سوي جدول وحط فيه الأيديات اللي تبيها

( columen ) بعدين سوي جريد فيه عمودين

id والثاني الآيدي car1 وحط في الأول

مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل :

-- # Client Side ~ : 
  
aCars = { 
    { 'Car [1]',411 }, 
    { 'Vehicle [2]',429 }, 
} 
  
for _,v in ipairs ( aCars ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',MyButton, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
        end 
    end,false 
) 

الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ

استفسار ويش فايدة

guiGridListGetItemData 
guiGridListSetItemData 

Link to comment
سوي جدول وحط فيه الأيديات اللي تبيها

( columen ) بعدين سوي جريد فيه عمودين

id والثاني الآيدي car1 وحط في الأول

مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل :

-- # Client Side ~ : 
  
aCars = { 
    { 'Car [1]',411 }, 
    { 'Vehicle [2]',429 }, 
} 
  
for _,v in ipairs ( aCars ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',MyButton, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
        end 
    end,false 
) 

الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ

استفسار ويش فايدة

guiGridListGetItemData 
guiGridListSetItemData 

شوف انا وش سويت هنا :

aCars = { 
    { 'Car [1]',411 }, 
    { 'Vehicle [2]',429 }, 
} 
  
for _,v in ipairs ( aCars ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] )  
end 

سويت لووب لـ التيبل و استخرجت القيمة الثانية الارقام الايدي حق السيارهــ :) وسويت لة داتا صح ؟ بـ الرو وألخ هي تحفظ الشيء بـ اللستة بـ معنى اوضح ..

و يوم جيت ارسل الترايقر جبت الداتا مثل ماشفت الداتا اللي مختارها [ = اتمنى فهمت ي آخوي ..

Link to comment
    cars = { 
    {579,"car1"}, 
    {400,"car2"}, 
    {404,"car3"}, 
    } 
    for i,v in ipairs (cars) do 
        local row = guiGridListAddRow (GUIEditor_Grid[1]) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) 
    end 

ض1 جربه

Link to comment

مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل :

-- # Client Side ~ : 
  
aCars = { 
    { 'Car [1]',411 }, 
    { 'Vehicle [2]',429 }, 
} 
  
for _,v in ipairs ( aCars ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',MyButton, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
        end 
    end,false 
) 

الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ

استفسار ويش فايدة

guiGridListGetItemData 
guiGridListSetItemData 

شوف انا وش سويت هنا :

aCars = { 
    { 'Car [1]',411 }, 
    { 'Vehicle [2]',429 }, 
} 
  
for _,v in ipairs ( aCars ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] )  
end 

سويت لووب لـ التيبل و استخرجت القيمة الثانية الارقام الايدي حق السيارهــ :) وسويت لة داتا صح ؟ بـ الرو وألخ هي تحفظ الشيء بـ اللستة بـ معنى اوضح ..

و يوم جيت ارسل الترايقر جبت الداتا مثل ماشفت الداتا اللي مختارها [ = اتمنى فهمت ي آخوي ..

طيب كيف بخليه يسوي سباون للسياره

في هذه الحركه

Link to comment
addEvent('Event',true) 
addEventHandler('Event',root, 
    function ( id ) 
        if tonumber ( id ) then 
        local x,y,z = getElementPosition ( client ) 
            if x and y and z and id then 
                createVehicle ( id,x,y,z ) 
        end 
    end 
end 
) 

لا تعتمد عليه مثآل

Link to comment
addEvent('Event',true) 
addEventHandler('Event',root, 
    function ( id ) 
        if tonumber ( id ) then 
        local x,y,z = getElementPosition ( client ) 
            if x and y and z and id then 
                createVehicle ( id,x,y,z ) 
        end 
    end 
end 
) 

لا تعتمد عليه مثآل

طيب تضبط لين اسويها مثل طريقة الاخ احمد

؟

    cars = { 
    {579,"car1"}, 
    {400,"car2"}, 
    {404,"car3"}, 
    } 
    for i,v in ipairs (cars) do 
        local row = guiGridListAddRow (GUIEditor_Grid[1]) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) 
    end 

ض1 جربه

Link to comment
addEvent('Event',true) 
addEventHandler('Event',root, 
    function ( id ) 
        if tonumber ( id ) then 
        local x,y,z = getElementPosition ( client ) 
            if x and y and z and id then 
                createVehicle ( id,x,y,z ) 
        end 
    end 
end 
) 

لا تعتمد عليه مثآل

طيب تضبط لين اسويها مثل طريقة الاخ احمد

؟

    cars = { 
    {579,"car1"}, 
    {400,"car2"}, 
    {404,"car3"}, 
    } 
    for i,v in ipairs (cars) do 
        local row = guiGridListAddRow (GUIEditor_Grid[1]) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) 
    end 

ض1 جربه

لا لازم تجيب الكلام حق اللستة انا داتا من التيبل مخفي .. :wink:

Link to comment
addEvent('Event',true) 
addEventHandler('Event',root, 
    function ( id ) 
        if tonumber ( id ) then 
        local x,y,z = getElementPosition ( client ) 
            if x and y and z and id then 
                createVehicle ( id,x,y,z ) 
        end 
    end 
end 
) 

لا تعتمد عليه مثآل

طيب تضبط لين اسويها مثل طريقة الاخ احمد

؟

    cars = { 
    {579,"car1"}, 
    {400,"car2"}, 
    {404,"car3"}, 
    } 
    for i,v in ipairs (cars) do 
        local row = guiGridListAddRow (GUIEditor_Grid[1]) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) 
        guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) 
    end 

ض1 جربه

لا لازم تجيب الكلام حق اللستة انا داتا من التيبل مخفي .. :wink:

استخدم الداتا و بتضبط ؟

Link to comment
-- # Client Side ~ : 
  
aSkins = { 
    { 'KSA',46 }, 
    { 'BH',0 }, 
} 
  
for _,v in ipairs ( aSkins ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',MyButton, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
        end 
    end,false 
) 

addEvent('Event',true) 
addEventHandler('Event',root, 
    function ( id ) 
        if tonumber ( id ) then 
        setElementModel ( client,id ) 
    end 
end 
) 

Link to comment
-- # Client Side ~ : 
  
aSkins = { 
    { 'KSA',46 }, 
    { 'BH',0 }, 
} 
  
for _,v in ipairs ( aSkins ) do   
    Row = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) 
    guiGridListSetItemData ( GridList,Row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',MyButton, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
        end 
    end,false 
) 

addEvent('Event',true) 
addEventHandler('Event',root, 
    function ( id ) 
        if tonumber ( id ) then 
        setElementModel ( client,id ) 
    end 
end 
) 

ويش فايدة

client 

ضغط عليها او وداني ويكي او مو كاتب شيء

Link to comment
createPed 
setElementModel 

و نفس اللي عطيتك ياها قبل شوي بس خله كلنت كل شيء ..

بخليه سيرفر الي قبل شوي

لان انا راح اسويه سباون

سيرفر يصير عند الكل كلنت

لاكن انا سويت سيرفر

  
Team = createTeam ( "No Team's", 255, 0, 0 ) 
  
setTeamFriendlyFire ( Team, false ) 
  
addEvent('Event',true) 
  
addEventHandler('Event',root, 
  
    function ( id ) 
  
        if tonumber ( id ) then 
  
        setElementModel ( client,id )  
         
        setCameraTarget(source,source) 
                
    end 
  
end 
  
) 

Link to comment

function onStart ( ) 
  local s,x = guiGetScreenSize () 
  local sx, sy, sz = getWorldFromScreenPosition ( s/2, x/2, 5 ) 
  ped = createPed ( 0, sx, sy, sz,180 ) 
  setElementFrozen ( ped,true ) 
  setCameraMatrix ( 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316 ) 
  outputChatBox ( '* Welcome At Our Servers Have Fun!',0,255,0 ) 
end 
  
onStart ( ) 
  
aSkins = {  
    { 'CJ',0 }, 
    { 'KSA',46 }, 
    { 'Test',1 } 
} 
  
for _,v in ipairs ( aSkins ) do 
    row = guiGridListAddRow ( GridList )  
        guiGridListSetItemText ( GridList,row,Column,v[1],false,false ) 
        guiGridListSetItemData ( GridList,row,Column,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',GridList, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
            setElementModel ( ped,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) 
    end 
end,false 
) 

سويت لك هالكود كملة كلنت بس انت سوي اللستة بـ متغير

GridList > ذذ وجربة وشوف

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