Sha[D]ow Posted April 3, 2016 Share Posted April 3, 2016 شباب لو سمحت بدي كود اذا ضغط علي زر يسحب سيارتي او سياره شخص بدي بس الأمر الي هو مثل setElementPosition او setElementInterior كده يعني شكرآ مقدمآ Link to comment
Jupi Posted April 3, 2016 Share Posted April 3, 2016 شباب لو سمحت بدي كود اذا ضغط علي زر يسحب سيارتي او سياره شخص بدي بس الأمر الي هو مثل setElementPosition او setElementInterior كده يعني شكرآ مقدمآ الحين انت تقصد يسحب يعني يدمرها ولا يجيبها لك .؟ Link to comment
#|_oskar_|# Posted April 3, 2016 Share Posted April 3, 2016 اذا تبي يسحب سياره استخدم destroyElement واذا كنت تقصد يركبها warpPedIntoVehicle او اذا كنت تقصد يجيب السياره لعنده استخدم getElementPosition Link to comment
Sha[D]ow Posted April 3, 2016 Author Share Posted April 3, 2016 اذا تبي يسحب سياره استخدمdestroyElement واذا كنت تقصد يركبها warpPedIntoVehicle او اذا كنت تقصد يجيب السياره لعنده استخدم getElementPosition ِشكرآ صديقي Link to comment
Sha[D]ow Posted April 3, 2016 Author Share Posted April 3, 2016 اذا تبي يسحب سياره استخدمdestroyElement واذا كنت تقصد يركبها warpPedIntoVehicle او اذا كنت تقصد يجيب السياره لعنده استخدم getElementPosition destroyElement ( getPlayerFromName (sply)) شو الغلط هون Link to comment
Me[Z]oO Posted April 3, 2016 Share Posted April 3, 2016 addEventHandler("onClientGUIClick",root,function() if source == GUIEditor.button[1] then if isPedInVehicle ( localPlayer ) then destroyElement ( getPedOccupiedVehicle(localPlayer) ) end end end ) Link to comment
Sha[D]ow Posted April 3, 2016 Author Share Posted April 3, 2016 ؟؟؟ addEventHandler("onClientGUIClick",root,function() if source == GUIEditor.button[1] then if isPedInVehicle ( localPlayer ) then destroyElement ( getPedOccupiedVehicle(localPlayer) ) end end end ) function jail() if(source == btnjail) then sply = guiGetText (nameEdit) local X, Y, Z = 194.13959, 174.59044, 1003.02344 if isPedInVehicle ( getPlayerFromName (sply) ) then destroyElement ( getPedOccupiedVehicle(getPlayerFromName (sply)) ) setElementPosition(getPlayerFromName (sply), X, Y, Z) setElementInterior ( getPlayerFromName (sply), 3 ) setElementDimension ( getPlayerFromName (sply), 92834) destroyElement ( getPlayerFromName (sply)) playSoundFrontEnd(3) end end end addEventHandler("onClientGUIClick", root, jail) Link to comment
Me[Z]oO Posted April 3, 2016 Share Posted April 3, 2016 function jail() if(source == btnjail) then sply = guiGetText (nameEdit) local X, Y, Z = 194.13959, 174.59044, 1003.02344 if isPedInVehicle ( getPlayerFromName (sply) ) then setElementPosition(getPlayerFromName (sply), X, Y, Z) setElementInterior ( getPlayerFromName (sply), 3 ) setElementDimension ( getPlayerFromName (sply), 92834) mezo = getPedOccupiedVehicle(getPlayerFromName (sply)) if mezo then destroyElement ( mezo) playSoundFrontEnd(3) end end end end addEventHandler("onClientGUIClick", root, jail) بعتذر فهمت طلبك غلط Link to comment
Sha[D]ow Posted April 3, 2016 Author Share Posted April 3, 2016 function jail() if(source == btnjail) then sply = guiGetText (nameEdit) local X, Y, Z = 194.13959, 174.59044, 1003.02344 if isPedInVehicle ( getPlayerFromName (sply) ) then setElementPosition(getPlayerFromName (sply), X, Y, Z) setElementInterior ( getPlayerFromName (sply), 3 ) setElementDimension ( getPlayerFromName (sply), 92834) mezo = getPedOccupiedVehicle(getPlayerFromName (sply)) if mezo then destroyElement ( mezo) playSoundFrontEnd(3) end end end end addEventHandler("onClientGUIClick", root, jail) بعتذر فهمت طلبك غلط شكرآ ميدو Link to comment
Me[Z]oO Posted April 3, 2016 Share Posted April 3, 2016 function jail() if(source == btnjail) then sply = guiGetText (nameEdit) local X, Y, Z = 194.13959, 174.59044, 1003.02344 if isPedInVehicle ( getPlayerFromName (sply) ) then setElementPosition(getPlayerFromName (sply), X, Y, Z) setElementInterior ( getPlayerFromName (sply), 3 ) setElementDimension ( getPlayerFromName (sply), 92834) mezo = getPedOccupiedVehicle(getPlayerFromName (sply)) if mezo then destroyElement ( mezo) playSoundFrontEnd(3) end end end end addEventHandler("onClientGUIClick", root, jail) بعتذر فهمت طلبك غلط شكرآ ميدو العفو حياك الله , منور والله فرحان بعودتك <3 <3 *ملحوظة بس نكي ميزو Link to comment
#|_oskar_|# Posted April 4, 2016 Share Posted April 4, 2016 سوي ترايقر من كلنت لسيرفر واستخدم الكود ذا addCommandHandler ( "de",function (Player,_,who) local PlayerName = getPlayerFromName ( who ) local Vehicle = getPedOccupiedVehicle (PlayerName) if PlayerName then if Vehicle then destroyElement (Vehicle) outputChatBox(getPlayerName (Player).. ' تم سحب سيارتك من قبل' ,PlayerName,255,255,0,true) else outputChatBox('هذا اللاعب لايملك سياره',Player,255,0,0,true) end else outputChatBox('هذا اللاعب ليس موجود',Player,255,0,0,true) end end) Link to comment
Sha[D]ow Posted April 4, 2016 Author Share Posted April 4, 2016 function jail() if(source == btnjail) then sply = guiGetText (nameEdit) local X, Y, Z = 194.13959, 174.59044, 1003.02344 if isPedInVehicle ( getPlayerFromName (sply) ) then setElementPosition(getPlayerFromName (sply), X, Y, Z) setElementInterior ( getPlayerFromName (sply), 3 ) setElementDimension ( getPlayerFromName (sply), 92834) mezo = getPedOccupiedVehicle(getPlayerFromName (sply)) if mezo then destroyElement ( mezo) playSoundFrontEnd(3) end end end end addEventHandler("onClientGUIClick", root, jail) بعتذر فهمت طلبك غلط لا يعمل Link to comment
Me[Z]oO Posted April 4, 2016 Share Posted April 4, 2016 function jail() if(source == btnjail) then sply = guiGetText (nameEdit) local X, Y, Z = 194.13959, 174.59044, 1003.02344 if isPedInVehicle ( getPlayerFromName (sply) ) then setElementPosition(getPlayerFromName (sply), X, Y, Z) setElementInterior ( getPlayerFromName (sply), 3 ) setElementDimension ( getPlayerFromName (sply), 92834) mezo = getPedOccupiedVehicle(getPlayerFromName (sply)) if mezo then destroyElement ( mezo) playSoundFrontEnd(3) end end end end addEventHandler("onClientGUIClick", root, jail) بعتذر فهمت طلبك غلط لا يعمل سؤال بس , هو الكود حقي اشتغل ولا لا ؟ Link to comment
nxFairlywell Posted April 4, 2016 Share Posted April 4, 2016 انت تبيه يسحب السيارة يعني يزيلها ولا تبيه ينقل السيارة لشخص ثاني Link to comment
#|_oskar_|# Posted April 4, 2016 Share Posted April 4, 2016 يب ما ظبط شغال مافي شئ اكتب ب اف 8 de اسم اللاعب مثال de Sha[D]ow Link to comment
#|_oskar_|# Posted April 4, 2016 Share Posted April 4, 2016 مثال فقط كلنت local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 200) / 2, (screenH - 284) / 2, 200, 284, "", false) guiWindowSetSizable(window, false) gridlist = guiCreateGridList(9, 22, 183, 227, false, window) guiGridListAddColumn(gridlist, "Name", 0.9) button = guiCreateButton(9, 248, 182, 26, "سحب السياره", false, window) for _, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow (gridlist) guiGridListSetItemText (gridlist, row,1, getPlayerName ( player ), false, false ) end addEventHandler("onClientGUIClick",button,function() if ( guiGridListGetSelectedItem(gridlist) ~= -1 ) then local plrs = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist),1) triggerServerEvent("ss",localPlayer,_,plrs) else outputChatBox('قم بالتحديد على اسم اللاعب لسحب سيارته',255,0,0,true) end end,false) سيرفر addEvent("ss",true) addEventHandler("ss",root,function (Player,who) local PlayerName = getPlayerFromName ( who ) local Vehicle = getPedOccupiedVehicle (PlayerName) if PlayerName then if Vehicle then destroyElement (Vehicle) outputChatBox(getPlayerName (source).. ' تم سحب سيارتك من قبل' ,PlayerName,255,255,0,true) else outputChatBox('هذا اللاعب لايملك سياره',Player,255,0,0,true) end else outputChatBox('هذا اللاعب ليس موجود',Player,255,0,0,true) end end) Link to comment
Jupi Posted April 4, 2016 Share Posted April 4, 2016 triggerServerEvent("ss",localPlayer,_,plrs) ليه تجاوزت ثالث ارقمنت ثم عرفته علي انه اللوكال بلاير؟ Link to comment
#|_oskar_|# Posted April 4, 2016 Share Posted April 4, 2016 triggerServerEvent("ss",localPlayer,_,plrs) ليه تجاوزت ثالث ارقمنت ثم عرفته علي انه اللوكال بلاير؟ عشان اعرف البلاير بملف السيرفر Link to comment
Jupi Posted April 4, 2016 Share Posted April 4, 2016 triggerServerEvent("ss",localPlayer,_,plrs) ليه تجاوزت ثالث ارقمنت ثم عرفته علي انه اللوكال بلاير؟ عشان اعرف البلاير بملف السيرفر طيب و ايه الفرق لو حطيته الاول ا والثاني؟ ض 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