iMr ~ MnHmAr Posted September 22, 2016 Share Posted September 22, 2016 السلام عليكم ورحمة الله وبركاته يآشباب انا عامل لوحه في 2 قريد ليست و كل قريد ليست فيه كولمن القريد لست الاول ابي يجي فيه مثل البدايه و النخيل لما يختار البدايه يرسبنه في احدثيات انا محدده كيف اعرف انه اختار بدايه او نخيل ابي شرح بسطي و الثاني فيه 3 شخصيات ممكن الفانكشنات الي احتاجهم مع شرح النقطه الي ذكرته فوق ^^ Link to comment
Adham Posted September 22, 2016 Share Posted September 22, 2016 (edited) table = {} -- تسوي جدول في احدثيات الامكان مثال table = { { "Al bdaidh", x,y,z }, } in ipairs guiGridListAddRow guiGridListSetItemText guiGridListSetItemData addEventHandler + "onClientGUIClick" guiGridListGetSelectedItem unpack + guiGridListGetItemData setElementPosition Edited September 22, 2016 by Le3bA 2 Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 Just now, Le3bA said: table = {} -- تسوي جدول في احدثيات الامكان مثال table = { { "Al bdaidh", x,y,z }, } in ipairs guiGridListAddRow guiGridListSetItemText guiGridListSetItemData addEventHandler + "onClientGUIClick" guiGridListGetSelectedItem unpack + guiGridListGetItemData setElementPosition طيب و الشخصيات + وضح شوي للآمآكن Link to comment
' A F . Posted September 22, 2016 Share Posted September 22, 2016 (edited) سوي جدول وحط فيه اسم المكان والاحداثيات .. مثال local Palces = { { "Place (1)",X,Y,Z}, } والشخصيات نفس الشيء . ثم سوي لوب واستخدم الوظائف هاذي guiGridListAddRow guiGridListSetItemText guiGridListSetItemData ثم سوي يوم يظغط الزر guiGridListGetSelectedItem guiGridListGetItemData triggerServerEvent setElementData spwnPlayer --- Server : onPlayerWasted getElementData spawnPlayer setCameraTarget اعذرني م ادري وش فيه البوست !! Edited September 22, 2016 by Default . 2 Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 Just now, Default said: سوي جدول وحط فيه اسم المكان والاحداثيات .. مثال local Palces = { { "Place (1)",X,Y,Z}, } والشخصيات نفس الشيء . ثم سوي لوب واستخدم الوظائف هاذي guiGridListAddRow guiGridListSetItemText guiGridListSetItemData ثم سوي يوم يظغط الزر guiGridListGetSelectedItem guiGridListGetItemData triggerServerEvent setElementData spwnPlayer --- Server : onPlayerWasted getElementData spawnPlayer setCameraTarget اعذرني م ادري وش فيه البوست !! اوك اخوي مشكور بحآول Link to comment
' A F . Posted September 22, 2016 Share Posted September 22, 2016 العفو حياك الله , اذا م ظبط معاك اطرح مشكلتك ونصلحها لك ان شاء الله 2 Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 ان شاء الله اعرف ماتقصرون 1 Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 (edited) سويت كذا لكن مايظهر شيء بي الجريد ليست ! للآمآكن سويت فقط كلنت Table = { { P = "البدايه",Px = -3414.95605, Py = -2990.36646, Pz = 15.06875 }, { P = "النخيل", Px = 2122.06396 , py = 1410.29590 , Pz = 10.82031 }, } for k,v in ipairs( Table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],row,1,v['p'] ,false,false) guiGridListSetItemText (GUIEditor.gridlist[1],row,1,v['Px,Py,Pz'],false,false) guiGridListSetItemData (GUIEditor.gridlist[1],row,1,v['p']) guiGridListSetItemData ( GUIEditor.gridlist[1],row,1,v['Px,Py,Pz']) guiGridListSetItemColor ( GUIEditor.gridlist[1],row,1, 255, 0, 0 ) guiGridListSetItemColor ( GUIEditor.gridlist[1],row,1, 0, 255, 255 ) end addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor.button[22] ) then if guiGridListGetSelectedItem(GUIEditor.gridlist[1]) ~= -1 then local x1,y1,z1 = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1) local myIData = guiGridListGetItemData ( GUIEditor.gridlist[1], row, 1 ) end end end ) triggerServerEvent('ReSp',localPlayer,x1,y1,z1) سيرفر addEvent("ReSp",true) addEventHandler("ReSp",root, function ( x1,y1,z1 ) setElementData(source,'DataRe','p') spawnPlayer ( source, x1,y1, z1, 0, 46) end ) addEventHandler( "onPlayerWasted", getRootElement( ), function() getElementData(source,'DataRe','p') setTimer( spawnPlayer, 2000, 1, source, x1,y1, z1 ) setCameraTarget ( source ) end ) Edited September 22, 2016 by back!_ Link to comment
' A F . Posted September 22, 2016 Share Posted September 22, 2016 لمم تتم التجربة -- Client local Table = { { "البدايه" , -3414.95605,-2990.36646,15.06875 }, { "النخيل" , 2122.06396 , 1410.29590 , 10.82031 }, } for index,value in ipairs ( Table ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1] , row , 1 , value[1] , false , false ) guiGridListSetItemData ( GUIEditor.gridlist[1] , row , 1 , {value[2],value[3],value[4]} ) end addEventHandler ( "onClientGUIClick" , root, function ( ) if ( source == GUIEditor.button[22] ) then local Selector = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( Selector ~= -1 ) then local PositonX,PositionY,PositionZ = unpack ( guiGridListGetItemData ( GUIEditor.gridlist[1] , Selector , 1 ) ) triggerServerEvent ( "onSelectSpawn" , localPlayer , PositonX,PositionY,PositionZ ) end end end ); ------ Server addEvent ( "onSelectSpawn" , true ) addEventHandler ( "onSelectSpawn" , root , function ( PositonX,PositionY,PositionZ ) setElementData ( source , "SpawnPositions" , {PositonX,PositionY,PositionZ} ) spawnPlayer ( source , PositonX,PositionY,PositionZ , 0 , 0 , 0 ) setCameraTarget ( source , source ) end ); addEventHandler ( "onPlayerWasted" , root , function ( ) local x,y,z = unpack ( getElementData ( source , "SpawnPositions" ) ) if ( x and y and z ) then setTimer( spawnPlayer , 2000, 1, source, x,y, z ) setCameraTarget ( source , source ) end end ); 1 Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 Just now, Default said: لمم تتم التجربة -- Client local Table = { { "البدايه" , -3414.95605,-2990.36646,15.06875 }, { "النخيل" , 2122.06396 , 1410.29590 , 10.82031 }, } for index,value in ipairs ( Table ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1] , row , 1 , value[1] , false , false ) guiGridListSetItemData ( GUIEditor.gridlist[1] , row , 1 , {value[2],value[3],value[4]} ) end addEventHandler ( "onClientGUIClick" , root, function ( ) if ( source == GUIEditor.button[22] ) then local Selector = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( Selector ~= -1 ) then local PositonX,PositionY,PositionZ = unpack ( guiGridListGetItemData ( GUIEditor.gridlist[1] , Selector , 1 ) ) triggerServerEvent ( "onSelectSpawn" , localPlayer , PositonX,PositionY,PositionZ ) end end end ); ------ Server addEvent ( "onSelectSpawn" , true ) addEventHandler ( "onSelectSpawn" , root , function ( PositonX,PositionY,PositionZ ) setElementData ( source , "SpawnPositions" , {PositonX,PositionY,PositionZ} ) spawnPlayer ( source , PositonX,PositionY,PositionZ , 0 , 0 , 0 ) setCameraTarget ( source , source ) end ); addEventHandler ( "onPlayerWasted" , root , function ( ) local x,y,z = unpack ( getElementData ( source , "SpawnPositions" ) ) if ( x and y and z ) then setTimer( spawnPlayer , 2000, 1, source, x,y, z ) setCameraTarget ( source , source ) end end ); مشكور زبطت وش الغلط الي كان عندي + يآ الغالي لوآبي احط كذا سبآون عادي؟ Link to comment
' A F . Posted September 22, 2016 Share Posted September 22, 2016 كيف مافهمت والله م شفت اكوادك بس سويتها لك بطريقتي .. Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 تسلم والله ماقصرت الشخصيات مثلها صح ؟ Link to comment
' A F . Posted September 22, 2016 Share Posted September 22, 2016 يب بس تغير الداتا تسويه كذا setElementData ( source , "Skin" , id ) Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 Just now, Default said: يب بس تغير الداتا تسويه كذا setElementData ( source , "Skin" , id ) اضيف دآتآ جديده ؟ Link to comment
' A F . Posted September 22, 2016 Share Posted September 22, 2016 (edited) يب او ضيف على الداتا القديمة Edited September 22, 2016 by Default Link to comment
iMr ~ MnHmAr Posted September 22, 2016 Author Share Posted September 22, 2016 Just now, Default said: يب او ضيف على الداتا القديمة اوك تسلم والله ماقصرت Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now