mouamle Posted March 14, 2014 Share Posted March 14, 2014 السلام عليكم شباب أبي كود يصنع سياره ما يركبها الى شخص محدد يأمى سيريال أو أسم وشكرا Link to comment
</Mr.Tn6eL> Posted March 14, 2014 Share Posted March 14, 2014 createVehicle getPlayerSerial Event : onVehicleEnter cancelEvent Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 createVehicle getPlayerSerial Event : onVehicleEnter cancelEvent شكرا Link to comment
mazzika Posted March 14, 2014 Share Posted March 14, 2014 (edited) Vehicles = { [429]=true } -- اي دي سيارة function enterVehicle ( thePlayer, seat, jacked ) local serial = getPlayerSerial ( thePlayer ) if not ( serial == "Your Serial" then -- ضع سريالك هنا if ( Vehicles[getElementModel ( source )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "هذه سيارة خاصة بـ mouamle-hassan", thePlayer, 255, 255, 0, false ) end else outputChatBox ( "اهلا وسهلا بك", thePlayer, 255, 255, 0, false ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) Edited March 14, 2014 by Guest Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 createVehicle getPlayerSerial Event : onVehicleEnter cancelEvent شكرا بس ما جاي أعرف كيف أرتب ألأكواد Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 Vehicles = { [429]=true } -- اي دي سيارة function enterVehicle ( thePlayer, seat, jacked ) local serial = getPlayerSerial ( thePlayer ) if not ( serial == "Your Serial" then -- ضع سريالك هنا if ( Vehicles[getElementModel ( source )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "هذه سيارة خاصة بـ mouamle-hassan", thePlayer, 255, 255, 0, false ) end else outputChatBox ( "اهلا وسهلا بك", thePlayer, 255, 255, 0, false ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) شكرا بس ما صار حطيت سيريال لاعب ثاني وركبت المود وركبت أنا بالسياره وما صار شي على العموم شكرا لأهتمامك وطلب أذا تقدر تخليها لتيم معين يكون أحسن Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 تأكد ان الكود سيرفر ممكن تسوي لتيم معين أسم التيم {grove} Link to comment
EH10 Posted March 14, 2014 Share Posted March 14, 2014 (edited) جـرب * Vehicles = createVehicle ( id, x, y, z ) addEventHandler ( "onVehicleStartEnter", Vehicles, function ( player ) if ( getPlayerTeam(source) ) and ( getTeamName(getPlayerTeam(source)) ) == "Your Team" then outputChatBox ( "حيـاك الله في سيارتك الخاصة", player, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "أملاك خاصة الى تيم Grove !", player, 255, 0, 0, true ) end end ) الـتـعـديـل : 1 - x y z = أحـدآثـيـآت الـسـيـارهـ 1 - id = رقـم الـسـيـارهـ 5 - Your Team = أسـم الـتـيـم Edited March 14, 2014 by Guest Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 جـرب * Vehicles = createVehicle ( id, x, y, z ) setPlayerDamageProof ( Vehicles, true ) addEventHandler ( "onVehicleStartEnter", Vehicles, function ( player ) if ( getPlayerTeam(source) ) and ( getTeamName(getPlayerTeam(source)) ) == "Your Team" then outputChatBox ( "حيـاك الله في سيارتك الخاصة", player, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "أملاك خاصة الى تيم Grove !", player, 255, 0, 0, true ) end end ) الـتـعـديـل : 1 - x y z = أحـدآثـيـآت الـسـيـارهـ 1 - id = رقـم الـسـيـارهـ 6 - Your Team = أسـم الـتـيـم مشششككوور أجرب وأرجعلك Link to comment
</Mr.Tn6eL> Posted March 14, 2014 Share Posted March 14, 2014 Vehicles = { [429]=true } -- اي دي سيارة function enterVehicle ( thePlayer, seat, jacked ) local serial = getPlayerSerial ( thePlayer ) if not ( serial == "Your Serial" then -- ضع سريالك هنا if ( Vehicles[getElementModel ( source )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "هذه سيارة خاصة بـ mouamle-hassan", thePlayer, 255, 255, 0, false ) end else outputChatBox ( "اهلا وسهلا بك", thePlayer, 255, 255, 0, false ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) يليل كله هذا عشان دخول سيارة بسريال Link to comment
jafar Posted March 14, 2014 Share Posted March 14, 2014 Vehicles = { [ 429 ] = true }; -- اي دي سيارة teamName = "Grove" -- اسم التيم function enterVehicle ( thePlayer, seat, jacked ) local playerTeam = getPlayerTeam ( thePlayer ); if ( Vehicles [ getElementModel ( source ) ] ) then if playerTeam and getTeamFromName ( playerTeam ) == teamName then outputChatBox ( "اهلا وسهلا بك", thePlayer, 255, 255, 0, false ); else cancelEvent ( ); outputChatBox ( "هذه سيارة خاصة بـفريق " .. teamName, thePlayer, 255, 0, 0, false ); end end end addEventHandler ( "onVehicleStartEnter", root, enterVehicle ); Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 أصلا السيارة ما تنزل بالأحداثيات الي سويتهن Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 Vehicles = { [ 429 ] = true }; -- اي دي سيارة teamName = "Grove" -- اسم التيم function enterVehicle ( thePlayer, seat, jacked ) local playerTeam = getPlayerTeam ( thePlayer ); if ( Vehicles [ getElementModel ( source ) ] ) then if playerTeam and getTeamFromName ( playerTeam ) == teamName then outputChatBox ( "اهلا وسهلا بك", thePlayer, 255, 255, 0, false ); else cancelEvent ( ); outputChatBox ( "هذه سيارة خاصة بـفريق " .. teamName, thePlayer, 255, 0, 0, false ); end end end addEventHandler ( "onVehicleStartEnter", root, enterVehicle ); لحد الأن ولا مود أشتغل معي Link to comment
EH10 Posted March 14, 2014 Share Posted March 14, 2014 جـرب ولاتنسا التـعديل * setTimer(function() Vehicles = createVehicle( id, x, y, z ) end, 1000, 1) addEventHandler ( "onVehicleStartEnter", Vehicles, function ( player ) if ( getPlayerTeam(source) ) and ( getTeamName(getPlayerTeam(source)) ) == "Your Team" then outputChatBox ( "حيـاك الله في سيارتك الخاصة", player, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "أملاك خاصة الى تيم Grove !", player, 255, 0, 0, true ) end end ) Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 جـرب ولاتنسا التـعديل * setTimer(function() Vehicles = createVehicle( id, x, y, z ) end, 1000, 1) addEventHandler ( "onVehicleStartEnter", Vehicles, function ( player ) if ( getPlayerTeam(source) ) and ( getTeamName(getPlayerTeam(source)) ) == "Your Team" then outputChatBox ( "حيـاك الله في سيارتك الخاصة", player, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "أملاك خاصة الى تيم Grove !", player, 255, 0, 0, true ) end end ) هذا كود السيرفر setTimer(function() Vehicles = createVehicle( 429, 0, 0, 0 ) end, 1000, 1) addEventHandler ( "onVehicleStartEnter", Vehicles, function ( player ) if ( getPlayerTeam(source) ) and ( getTeamName(getPlayerTeam(source)) ) == "Grove" then outputChatBox ( "حيـاك الله في سيارتك الخاصة", player, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "أملاك خاصة الى تيم Grove !", player, 255, 0, 0, true ) end end ) وذا الميتا "mouamle" version="0.1" name="car" type="script" /> وشوفلي وين الخطأ Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 صار ونزلت السيارة بس المشكله السيارة ما تنركب أتوقع لأنه كلنت Link to comment
EH10 Posted March 14, 2014 Share Posted March 14, 2014 صار ونزلت السيارة بس المشكله السيارة ما تنركب أتوقع لأنه كلنت خله سيرفر Link to comment
mouamle Posted March 14, 2014 Author Share Posted March 14, 2014 صار ونزلت السيارة بس المشكله السيارة ما تنركب أتوقع لأنه كلنت خله سيرفر مشاكل ما بتخلص نزلت السياره وقدرت أركب بيها بس المشكله أني طلت من التيم وقدرت أركبها مره ثانيه Link to comment
EH10 Posted March 14, 2014 Share Posted March 14, 2014 جـرب * setTimer(function() Vehicles = createVehicle( 429, 0, 0, 0 ) end, 1000, 1) addEventHandler ( "onVehicleStartEnter", Vehicles, function(player) if ( getPlayerTeam(player) ) and ( getTeamName(getPlayerTeam(player)) ) == "Grove" then outputChatBox ( "حيـاك الله في سيارتك الخاصة", player, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "أملاك خاصة الى تيم Grove !", player, 255, 0, 0, true ) end end ) Link to comment
mazzika Posted March 14, 2014 Share Posted March 14, 2014 createVehicle ( 429, x, y, z ) الاحدثيات + الاي دي السيارة Vehicles = { [429]=true } -- اي دي سيارة function enterVehicle ( thePlayer, seat, jacked ) local serial = getPlayerSerial ( thePlayer ) if not ( serial == "Your Serial" then -- ضع سريالك هنا if ( Vehicles[getElementModel ( source )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "هذه سيارة خاصة بـ mouamle-hassan", thePlayer, 255, 255, 0, false ) end else outputChatBox ( "اهلا وسهلا بك", thePlayer, 255, 255, 0, false ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) حطيت الكود لانه يقول ان السيارة ماتنزل , جرب شغله وتأكد من الاحدثيات وحط سيريالك Link to comment
#DRAGON!FIRE Posted March 14, 2014 Share Posted March 14, 2014 الردود اللي فوق .. تستهبلون ؟ > رجاء اللي ما يعرف يساعد لا يساعد دوختوا الرجال ! ثأنيا .. هو يقول بـ سيريال !! .. الاستبدال ... : السطر 1 احداثيات السيارة # السطر الثاني ايدي السيارة # " " السطر الرابع تحط سيريالك بين الـ # ولو تبغى تضيف سيريال ثاني فهو موضح بـ الكود ذذ . local PosX, PosY, PosZ = local Model = local vehicle = createVehicle( Model, PosX, PosY, PosZ ) Serials = { ["YourSerialHere"] = true, --[[ ["PlayerSerial"] = true or false, ]] -- } addEventHandler ( "onVehicleStartEnter", root, function( player ) if ( source == vehicle ) then local Ps = getPlayerSerial( player ) if ( Serials[Ps] ) then outputChatBox ( "** Welcome "..getPlayerName( player ).." To your car ^", player, 0, 255, 255, true ) else cancelEvent ( true ) outputChatBox ( "** This privately owned vehicle", player, 0, 255, 255, true ) end end end ) Link to comment
#DRAGON!FIRE Posted March 14, 2014 Share Posted March 14, 2014 كودي شغال 100% -_-" -__- كودك خطا .. نسخ + لصق 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