Jump to content

طلب كود قريد لست للصوت


Recommended Posts

متأكد ؟

الكود شغال انا مجربه,

اضغط على الزر ويشتغل الصوت,,

wnd = guiCreateWindow(...) -- النافذه 
button = guiCreateButton(...) -- الزر 
Grid = guiCreateGridList(...) -- الجريد ليست 
local Column = guiGridListAddColumn(Grid,"Sound...",0.90) -- الكلام الي تبي يظهر  
local Row = guiGridListAddRow (Grid)  
guiGridListSetSelectionMode(Grid,0) 
guiGridListSetItemText (Grid, Row, Column, "New", false, false) -- الي تبيه يظهر بالجريد ليست مثلا انشوده اليامي 
addEventHandler("onClientGUIClick",button, 
function() 
    if guiGridListGetSelectedItem (Grid) then 
      local Get = guiGridListGetItemText (Grid, guiGridListGetSelectedItem (Grid), 1) 
playSound("Sound.mp3") 
   end 
end) 

مافهمت كودك ياخي

+

كذا صح ؟

GUIEditor.window[1] = guiCreateWindow() 
StartSound = guiCreateButton()  
gridlist1 = guiCreateGridList()  
local Column = guiGridListAddColumn(gridlist1,"Sound...",0.90)  
local Row = guiGridListAddRow (gridlist1)  
guiGridListSetSelectionMode(gridlist1,0) 
guiGridListSetItemText (gridlist1, Row, Column, "New", false, false) 
addEventHandler("onClientGUIClick",button, 
function() 
    if guiGridListGetSelectedItem (gridlist1) then 
      local Get = guiGridListGetItemText (Grid, guiGridListGetSelectedItem (gridlist1), 1) 
playSound("Sound.mp3") 
   end 
end) 

يا ابو فيصل طبيعي ما راح تفهم الكود لانه مختصر اشياء كثيره :?

Link to comment
  • Replies 131
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

win = guiCreateWindow(142,67,507,400,"Sounds",false) 
button = guiCreateButton(292,300,126,45,"Start",false,win) 
addEventHandler("onClientResourceStart",resourceRoot, 
function GL() 
List = guiCreateGridList(9,21,217,347, false, win) 
local Column = guiGridListAddColumn(List,"Sound...",0.90) 
local Row = guiGridListAddRow (List) 
guiGridListSetSelectionMode(List,2) 
guiGridListSetItemText (List, Row, Column,"New", false, false) 
end) 
setTimer(GL,10000,0) 
addEventHandler("onClientGUIClick",button, 
function() 
    if guiGridListGetSelectedItem (List) then 
      local Get = guiGridListGetItemText (List, guiGridListGetSelectedItem (List), 1) 
      local x,y,z = getElementPosition(localPlayer) 
playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 
   end 
end) 

ضيف بس رابط الصوت الي تبيه...

Link to comment
win = guiCreateWindow(142,67,507,400,"Sounds",false) 
button = guiCreateButton(292,300,126,45,"Start",false,win) 
addEventHandler("onClientResourceStart",resourceRoot, 
function GL() 
List = guiCreateGridList(9,21,217,347, false, win) 
local Column = guiGridListAddColumn(List,"Sound...",0.90) 
local Row = guiGridListAddRow (List) 
guiGridListSetSelectionMode(List,2) 
guiGridListSetItemText (List, Row, Column,"New", false, false) 
end) 
setTimer(GL,10000,0) 
addEventHandler("onClientGUIClick",button, 
function() 
    if guiGridListGetSelectedItem (List) then 
      local Get = guiGridListGetItemText (List, guiGridListGetSelectedItem (List), 1) 
      local x,y,z = getElementPosition(localPlayer) 
playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 
   end 
end) 

ضيف بس رابط الصوت الي تبيه...

:arrowdown:

ملاحظة: كذا الانشودة راح تشتغل للاعبين اللي حولك مو لك انت بس
Link to comment
ملاحظة: كذا الانشودة راح تشتغل للاعبين اللي حولك مو لك انت بس

Creates a sound element in the GTA world and plays it immediately after creation for the local player. setElementPosition can be used to move the sound element around after it has been created.

Edited by Guest
Link to comment
win = guiCreateWindow(142,67,507,400,"Sounds",false) 
button = guiCreateButton(292,300,126,45,"Start",false,win) 
addEventHandler("onClientResourceStart",resourceRoot, 
function GL() 
List = guiCreateGridList(9,21,217,347, false, win) 
local Column = guiGridListAddColumn(List,"Sound...",0.90) 
local Row = guiGridListAddRow (List) 
guiGridListSetSelectionMode(List,2) 
guiGridListSetItemText (List, Row, Column,"New", false, false) 
end) 
setTimer(GL,10000,0) 
addEventHandler("onClientGUIClick",button, 
function() 
    if guiGridListGetSelectedItem (List) then 
      local Get = guiGridListGetItemText (List, guiGridListGetSelectedItem (List), 1) 
      local x,y,z = getElementPosition(localPlayer) 
playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 
   end 
end) 

ضيف بس رابط الصوت الي تبيه...

خرب الكلينت كامل

Link to comment
ملاحظة: كذا الانشودة راح تشتغل للاعبين اللي حولك مو لك انت بس

Creates a sound element in the GTA world and plays it immediately after creation for the local player. setElementPosition can be used to move the sound element around after it has been created.

يا رجل انت داري وش مكتوب..؟

Link to comment

^ لول ما انتبهت لـ هذي,

+

الي اشوفه ان الويكي كاتب للاعب,

for the local player.

لو كان للكل كان كتب

for all players.

طيب الحين وش الحل

:D

win = guiCreateWindow(142,67,507,400,"Sounds",false) 
button = guiCreateButton(292,300,126,45,"Start",false,win) 
function GL() 
List = guiCreateGridList(9,21,217,347, false, win) 
local Column = guiGridListAddColumn(List,"Sound...",0.90) 
local Row = guiGridListAddRow (List) 
guiGridListSetSelectionMode(List,2) 
guiGridListSetItemText (List, Row, Column,"New", false, false) 
end 
addEventHandler("onClientResourceStart",resourceRoot,GL) 
setTimer(GL,10000,0) 
addEventHandler("onClientGUIClick",root, 
function() 
if source == button then 
      local Get = guiGridListGetItemText (List, guiGridListGetSelectedItem (List), 1) 
      local x,y,z = getElementPosition(localPlayer) 
local playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 
     end 
end) 

انا مجربه وشغال ,

غير الرابط لانه خربان,

Edited by Guest
Link to comment

ي شباب اللي مايعرف يساعد لا يساعد يرحم والديكم خبصتو الرجال المسكين | = ضيعتوهـ :

-- # Client Side : 
local GridList = MyGridList -- متغير القريد حقكـ # 
local Button = MyButton 
local Sound = { 
    -- { String Text,String URL }, 
        { 'Test','URL Test' }, 
} 
  
for _,v in next,Sound do 
    MyRow = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,MyRow,1,v[1],false,false ) 
    guiGridListSetItemData ( GridList,MyRow,1,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',Button, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
        if isElement ( sound ) then 
            destroyElement ( sound ) 
        end 
        sound = playSound ( guiGridListGetItemData ( GridList,MyRow,1 ) ) 
        outputChatBox(' Sound Loading ...') 
    end 
end,false 
) 

استبدل :

local GridList = MyGridList -- متغير القريد حقكـ #

MyGridList = متغير القريد لست

local Button = MyButton -- متغير الزر حقكـ #

MyButton = متغير الزر

الكولمون هو الاول ( 1 ) اذا حاب تغيرة غيرة ذذ

و حط لكلام بالجدول و الرابط + واضح لك بالكود اظن :) .. بـ انتظاركـ بعد التجربة ..

Link to comment
^ لول ما انتبهت لـ هذي,

+

الي اشوفه ان الويكي كاتب للاعب,

for the local player.

لو كان للكل كان كتب

for all players.

طيب الحين وش الحل

:D

win = guiCreateWindow(142,67,507,400,"Sounds",false) 
button = guiCreateButton(292,300,126,45,"Start",false,win) 
function GL() 
List = guiCreateGridList(9,21,217,347, false, win) 
local Column = guiGridListAddColumn(List,"Sound...",0.90) 
local Row = guiGridListAddRow (List) 
guiGridListSetSelectionMode(List,2) 
guiGridListSetItemText (List, Row, Column,"New", false, false) 
end 
addEventHandler("onClientResourceStart",resourceRoot,GL) 
setTimer(GL,10000,0) 
addEventHandler("onClientGUIClick",root, 
function() 
if source == button then 
      local Get = guiGridListGetItemText (List, guiGridListGetSelectedItem (List), 1) 
      local x,y,z = getElementPosition(localPlayer) 
local playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 
     end 
end) 

انا مجربه وشغال ,

غير الرابط لانه خربان,

يا رجل نفس الغلط....؟

      local x,y,z = getElementPosition(localPlayer) 
local playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 

Link to comment
ملاحظة: كذا الانشودة راح تشتغل للاعبين اللي حولك مو لك انت بس

Creates a sound element in the GTA world and plays it immediately after creation for the local player. setElementPosition can be used to move the sound element around after it has been created.

يا رجل انت داري وش مكتوب..؟

local x,y,z = getElementPosition(localPlayer) 
    local playSound3D("http://www.tvquran.com/add/Tilawat_12.htm",x,y,z) 

Link to comment

الصوت كلنت يعني الصوت لة نفسة لحاله غيرة مايسمعه و كودك حوسة ي ذآ بست -_- خبصت ام الشغلة تايمر و كل شوي قريد |: اختصر ورتب ذذ و الصوت لة لحاله كلنت ..

Link to comment
ي شباب اللي مايعرف يساعد لا يساعد يرحم والديكم خبصتو الرجال المسكين | = ضيعتوهـ :

-- # Client Side : 
local GridList = MyGridList -- متغير القريد حقكـ # 
local Button = MyButton 
local Sound = { 
    -- { String Text,String URL }, 
        { 'Test','URL Test' }, 
} 
  
for _,v in next,Sound do 
    MyRow = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,MyRow,1,v[1],false,false ) 
    guiGridListSetItemData ( GridList,MyRow,1,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',Button, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
        if isElement ( sound ) then 
            destroyElement ( sound ) 
        end 
        sound = playSound ( guiGridListGetItemData ( GridList,MyRow,1 ) ) 
        outputChatBox(' Sound Loading ...') 
    end 
end,false 
) 

استبدل :

local GridList = MyGridList -- متغير القريد حقكـ #

MyGridList = متغير القريد لست

local Button = MyButton -- متغير الزر حقكـ #

MyButton = متغير الزر

الكولمون هو الاول ( 1 ) اذا حاب تغيرة غيرة ذذ

و حط لكلام بالجدول و الرابط + واضح لك بالكود اظن :) .. بـ انتظاركـ بعد التجربة ..

متغير الزر حقكـ

يعني زر

Start

Link to comment
الصوت كلنت يعني الصوت لة نفسة لحاله غيرة مايسمعه و كودك حوسة ي ذآ بست -_- خبصت ام الشغلة تايمر و كل شوي قريد |: اختصر ورتب ذذ و الصوت لة لحاله كلنت ..

انا اشوف كودي انه ملحوس,

لان مخي ملحوس , سهرآن...,

+ بس انا قلت له كذآ لاني ادري انه بسوي سالفه مثل كنق,

Link to comment
اي ذذ

برستيج شوف بعد التعديل

خطاء

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

local GridList = gridlist1  
local Button = StartSound 
local Sound = { 
    -- { String Text,String URL }, 
        { 'Test','URL Test' }, 
} 
  
for _,v in next,Sound do 
    MyRow = guiGridListAddRow ( GridList ) 
    guiGridListSetItemText ( GridList,MyRow,1,v[1],false,false ) 
    guiGridListSetItemData ( GridList,MyRow,1,v[2] ) 
end 
  
addEventHandler('onClientGUIClick',StartSound, 
    function (      ) 
        if guiGridListGetSelectedItem ( GridList ) ~= -1 then 
        if isElement ( sound ) then 
            destroyElement ( sound ) 
        end 
        sound = playSound ( guiGridListGetItemData ( GridList,MyRow,1 ) ) 
        outputChatBox(' Sound Loading ...') 
    end 
end,false 
) 

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