~Mr.Hassan Posted August 14, 2015 Share Posted August 14, 2015 السلام عليكم ابي فنكشات لما اضغط اي دي السياره بتيكست وحط على البوتون يعطي كل الاعبين سياره الي كتبتها بتيكست ثاني فنكشن ابي لما احط بتيكست الدم لي ابيه اعطي للاعبين واضغط على البوتون يعطيهم وشكرا بس الفنكشات وبعملهم واذا فيه اي غلط ارجعلكم Link to comment
; Mr.T76eM # Posted August 14, 2015 Share Posted August 14, 2015 (edited) 1- guiGetText( أسم الاديت ) loop -- على الاعبين getElementPosition ( .. ) createVehicle( .. ) triggerServerEvent ( .. ) warpPedIntoVehicle(..) "onClientGUIClick" 2- guiGetText( الاديت ) loop -- على الاعبين setElementHealth ( .. ) "onClientGUIClick" اظن هذا كل شيء " حاول بنفسك ! " Edited August 14, 2015 by Guest Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 اول طلب addEventHandler ( "onClientGUIClick", root, function ( ) if source == carid then local carid = guiGetText(carid) triggerServerEvent("carid", localPlayer, zz) end end ) addEvent ( "carid", true ) addEventHandler ( "carid", root, function ( carid ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local v = createVehicle(( tonumber ( carid ) , x, y, z) warpPedIntoVehicle(source, v) end end ) Link to comment
Sha[D]ow Posted August 14, 2015 Share Posted August 14, 2015 اعتقد الخطآ انك تكرر حرف v فى الوب و فى انشاء مركبة Link to comment
; Mr.T76eM # Posted August 14, 2015 Share Posted August 14, 2015 اول طلب addEventHandler ( "onClientGUIClick", root, function ( ) if source == carid then local carid = guiGetText(carid) triggerServerEvent("carid", localPlayer, zz) end end ) addEvent ( "carid", true ) addEventHandler ( "carid", root, function ( carid ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local v = createVehicle(( tonumber ( carid ) , x, y, z) warpPedIntoVehicle(source, v) end end ) وش المطلوب طيب جرب ؟ Link to comment
; Mr.T76eM # Posted August 14, 2015 Share Posted August 14, 2015 جرب addEventHandler ( "onClientGUIClick", root, function ( ) if source == carid then local id = guiGetText(Edit Name) triggerServerEvent("carid", localPlayer, id) end end ) addEvent ( "carid", true ) addEventHandler ( "carid", root, function ( carid ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local veh = createVehicle(( tonumber ( carid ) , x+ math.random(1,3), y, z) warpPedIntoVehicle(v, veh) end end ) برب صلآة . Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 شكرا كان عندك غلط تم تصليح بس اعمل يطلعلي اكثر من سياره ليه ؟ ابي بس احط سياره ثانيه تروح الي عطيته ياها اول واحده Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 شكرا كان عندك غلط تم تصليحبس اعمل يطلعلي اكثر من سياره ليه ؟ ابي بس احط سياره ثانيه تروح الي عطيته ياها اول واحده isElement destroyElement Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 if isElement ( Vehicle ) then destroyElement ( vehicle ) في اي اسطر احطهم ؟ Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 addEvent ( "carid", true ) addEventHandler ( "carid", root, function ( carid ) if isElement ( veh ) then destroyElement ( veh ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local veh = createVehicle(( tonumber ( carid ) , x+ math.random(1,3), y, z) warpPedIntoVehicle(v, veh) end end end ) Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 لسا طلب ثاني انا عندي تيكست اسمه reason كيف اعمل وقت توزيع يعين وقت اضغط عا البوتون يرسل في الشات Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 خخخخخخخخخخخخ خرب سكربت Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 لكل اللاعبين يرسل ؟ guiGetText triggerServerEvent outputChatBox Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 انا صلحت كود تدمير وطلع بيعمل اما بس نسخت كودك وكذا ما ظبط خربت الكود كله ذذ Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 انا صلحت كود تدميروطلع بيعمل اما بس نسخت كودك وكذا ما ظبط خربت الكود كله ذذ debugscript 3 ? Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 addEvent ( "set", true ) addEventHandler ( "set", root, function ( id ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local veh = createVehicle( tonumber ( id ) , x+ math.random(1,3), y, z) warpPedIntoVehicle(v, veh) end end ) ذا الكود وقت صلحته Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 أستخدم كودي وشف الدي بق ايش يقول ؟ Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 مظبط والدي بوق يقلي ERROR: Client (DD) triggered ServerSide event set,but event is not added serverside كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if source == set then local id = guiGetText(carid) triggerServerEvent("set", localPlayer, id) end end ) addEvent ( "set", true ) addEventHandler ( "set", root, function ( id ) if isElement ( veh ) then destroyElement ( veh ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local veh = createVehicle( tonumber ( id ) , x+ math.random(1,3), y, z) warpPedIntoVehicle(v, veh) end end end ) Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 غير اسم الزر لا تحط اسم فنكشن Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 ما ظبط addEventHandler ( "onClientGUIClick", root, function ( ) if source == button1 then local id = guiGetText(carid) triggerServerEvent("hss", localPlayer, id) end end ) addEvent ( "hss", true ) addEventHandler ( "hss", root, function ( id ) if isElement ( veh ) then destroyElement ( veh ) for _,v in ipairs ( getElementsByType ( "player" ) ) do x, y, z = getElementPosition(v) local veh = createVehicle( tonumber ( id ) , x+ math.random(1,3), y, z) warpPedIntoVehicle(v, veh) end end end ) Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 -- Client Side addEventHandler ( "onClientGUIClick", root, function ( ) if source == button1 then local id = guiGetText(carid) if ( id ~= " " ) then triggerServerEvent("hss", localPlayer, id) end end end ) -- Server Side addEvent ( "hss", true ) addEventHandler ( "hss", root, function ( id ) for _,v in ipairs ( getElementsByType ( "player" ) ) do local x, y, z = getElementPosition( v ) if not isElement( veh ) then veh = createVehicle( id, x, y, z ) warpPedIntoVehicle(v, veh) else if isElement ( veh ) then destroyElement ( veh ) end end end end ) Link to comment
~Mr.Hassan Posted August 14, 2015 Author Share Posted August 14, 2015 تمت الافاده من قبل سفاح ظل مين يعطينى ال سبب توزيع ؟ ممكن توضحولي الفنكشات Link to comment
iMr.SFA7 Posted August 14, 2015 Share Posted August 14, 2015 تمت الافاده من قبل سفاحظل مين يعطينى ال سبب توزيع ؟ ممكن توضحولي الفنكشات تبي تكتب السبب بالاديت ؟؟ 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