AhmeD~9MoD Posted May 11, 2013 Share Posted May 11, 2013 (edited) شباب وين الخطأ في الكود .. ؟ server side -- addEvent ( "lockcar", true ) function lockcar ( thePlayer ) playervehicle = getPlayerOccupiedVehicle ( thePlayer ) if ( playervehicle ) then if isVehicleLocked ( playervehicle ) then setVehicleLocked ( playervehicle, true ) else end end end addEventHandler( "lockcar", root, lockcar ) addEvent ( "lockcar2", true ) function lockcar ( thePlayer ) playervehicle = getPlayerOccupiedVehicle ( thePlayer ) if ( playervehicle ) then if isVehicleLocked ( playervehicle ) then setVehicleLocked ( playervehicle, false ) else end end end addEventHandler( "lockcar2", root, lockcar2 ) Edited May 11, 2013 by Guest Link to comment
iMr.Dawix~# Posted May 11, 2013 Share Posted May 11, 2013 فيه تكمله للكود كلنت ولا سيرفر؟ + كودك تقدر تختصره كذا addEvent ( "lockcar", true ) function lockcar ( thePlayer ) playervehicle = getPlayerOccupiedVehicle ( thePlayer ) if ( playervehicle ) then if isVehicleLocked ( playervehicle ) then setVehicleLocked(playervehicle,true) else setVehicleLocked(playervehicle,false) end end end addEventHandler( "lockcar", root, lockcar ) Link to comment
iPrestege Posted May 11, 2013 Share Posted May 11, 2013 لازم تتأكد بالكلنت الترايقر معرف 'thePlayer' Link to comment
3NAD Posted May 11, 2013 Share Posted May 11, 2013 المشكلة اثنينكم ملخبطين في تحقيق الشرط .. if isVehicleLocked ( playervehicle ) then -- إذا تحقق الشرط ان السيارة مقفلة setVehicleLocked ( playervehicle, true ) -- يقفلها مرة ثانية ..... حشيش <@> Link to comment
AhmeD~9MoD Posted May 11, 2013 Author Share Posted May 11, 2013 ذآ الترايقر client side -- addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then triggerServerEvent("lockcar",getLocalPlayer()) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("lockcar2",getLocalPlayer()) end end ) Link to comment
AhmeD~9MoD Posted May 11, 2013 Author Share Posted May 11, 2013 او لازم يكون الترايقر كذا .. ؟ addEventHandler("onClientGUIClick", root, function( thePlayer ) if ( thePlayer == GUIEditor.button[1] ) then triggerServerEvent("lockcar",getLocalPlayer()) elseif ( thePlayer == GUIEditor.button[2] ) then triggerServerEvent("lockcar2",getLocalPlayer()) end end ) Link to comment
فاّرس Posted May 11, 2013 Share Posted May 11, 2013 --Client-- addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then triggerServerEvent("lockcar",getLocalPlayer()) end end) --Server-- addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, false ) else if isVehicleLocked ( playervehicle ) then setVehicleLocked ( playervehicle, true ) end end end) Link to comment
MR.S3D Posted May 11, 2013 Share Posted May 11, 2013 addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then -- يتأكد انه في السيارة setVehicleLocked ( playervehicle, false ) -- يفتح السيارة else -- اذا ماكان في سيارة if isVehicleLocked ( playervehicle ) then -- يتأكد ان مخ اللاعب مقفل setVehicleLocked ( playervehicle, true ) --- يقفله له مره ثانيه end end end ياسلام عليك Link to comment
فاّرس Posted May 11, 2013 Share Posted May 11, 2013 addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, true ) else if isVehicleLocked ( playervehicle ) then setVehicleLocked ( playervehicle, false ) end end end) تلخبطت بالفالس والترو Link to comment
MR.S3D Posted May 11, 2013 Share Posted May 11, 2013 التصحيح -- addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() local playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle )) end end ) Link to comment
AhmeD~9MoD Posted May 11, 2013 Author Share Posted May 11, 2013 طيب , لين جيت أبي افك القفل ..؟ انا مسوي لوحة فيها زرين زر يخلي السيارة مقفلة وزر يفك القفل بكذا زر الي يفك القفل مامنه فايدة و اللاعب ادا أقفل السيارة مايقدر يفتحها مرة ثانية !! >< Link to comment
فاّرس Posted May 11, 2013 Share Posted May 11, 2013 التصحيح -- addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() local playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle )) end end ) العجيب انه مافي فالس وترو وشغال هه, طيب , لين جيت أبي افك القفل ..؟انا مسوي لوحة فيها زرين زر يخلي السيارة مقفلة وزر يفك القفل بكذا زر الي يفك القفل مامنه فايدة و اللاعب ادا أقفل السيارة مايقدر يفتحها مرة ثانية !! >< الكود راح يقفل السيارة ويفتحها بنفس الزر, Link to comment
iPrestege Posted May 11, 2013 Share Posted May 11, 2013 addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function( ) playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle ) ) end end ) Link to comment
فاّرس Posted May 11, 2013 Share Posted May 11, 2013 addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function( ) playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle ) ) end end ) التصحيح -- addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() local playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle )) end end ) Link to comment
MR.S3D Posted May 11, 2013 Share Posted May 11, 2013 كلنت addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then triggerServerEvent("lockcar",getLocalPlayer(),true) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("lockcar",getLocalPlayer(),false) end end ) سيرفر addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function(bole) local playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then if bole and isVehicleLocked ( playervehicle ) then return end setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle )) end end ) Link to comment
iPrestege Posted May 11, 2013 Share Posted May 11, 2013 addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function( ) playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle ) ) end end ) التصحيح -- addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function() local playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle )) end end ) اوهـ / = احسبة صفحة وحدهـ -.- ماعليه خخ Link to comment
AhmeD~9MoD Posted May 11, 2013 Author Share Posted May 11, 2013 كلنت addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then triggerServerEvent("lockcar",getLocalPlayer(),true) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("lockcar",getLocalPlayer(),false) end end ) سيرفر addEvent ( "lockcar", true ) addEventHandler( "lockcar", root, function(bole) local playervehicle = getPlayerOccupiedVehicle ( source ) if ( playervehicle ) then if bole and isVehicleLocked ( playervehicle ) then return end setVehicleLocked ( playervehicle, not isVehicleLocked ( playervehicle )) end end ) Thx ! Link to comment
AhmeD~9MoD Posted May 11, 2013 Author Share Posted May 11, 2013 حياك في أي وقت جياك ؟ Link to comment
فاّرس Posted May 11, 2013 Share Posted May 11, 2013 حياك في أي وقت جياك ؟ احمد ربك احد يساعدك, المفروض ما تنعطى وجه مع احترامي, Link to comment
AhmeD~9MoD Posted May 11, 2013 Author Share Posted May 11, 2013 حياك في أي وقت جياك ؟ احمد ربك احد يساعدك, المفروض ما تنعطى وجه مع احترامي, امزح معاه ياخي , ليش هالحقد ؟ 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