кιηg-αвα∂у Posted November 19, 2012 Share Posted November 19, 2012 (edited) السلام عليكم ممكن تشوفون وش الخطأ في الكود ؟؟ myVehicles = { [470]=false,[560]=false,[562]=false,[487]=false } mySkins = { [115]=true } function enterVehicle ( thePlayer, seat, jacked ) if ( myVehicles[getElementModel ( source )] ) and ( not mySkins[getElementModel ( thePlayer )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "ممتلكات خاصة لايمكنك ركوب السيارة", thePlayer ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) Edited November 19, 2012 by Guest Link to comment
./BlackBird# Posted November 19, 2012 Share Posted November 19, 2012 لما تنسخ الكود من الويكي تاكد انك ناسخه صح Link to comment
iPrestege Posted November 19, 2012 Share Posted November 19, 2012 يوم عنـاد سوى الكود = المود الكل سوآهـ Link to comment
кιηg-αвα∂у Posted November 19, 2012 Author Share Posted November 19, 2012 لما تنسخ الكود من الويكي تاكد انك ناسخه صح مافي شي نااقص ؟؟ Link to comment
./BlackBird# Posted November 19, 2012 Share Posted November 19, 2012 ادري بس انت حاط false شوف ذذ الكود car = createVehicle( ... ) MySerial = (سريالك هنا) function enter(thePlayer) if(source==car and getPlayerSerial(thePlayer)~=MySerial)then outputChatBox("املاك خاصه") cancelEvent() end end addEventHandler("OnVehicleStartEnter",root,enter Link to comment
кιηg-αвα∂у Posted November 19, 2012 Author Share Posted November 19, 2012 كنت حاطه قبل true بس ماضبط بجرب كودك اغير شي في car = createVehicle( ... ) ? Link to comment
abu5lf Posted November 19, 2012 Share Posted November 19, 2012 كنت حاطه قبل true بس ماضبط بجرب كودك اغير شي في car = createVehicle( ... ) ? رقم الموتر والاحداثيات Id, z, y, x Link to comment
|Mr|-Talal07-| Posted November 20, 2012 Share Posted November 20, 2012 جرب ذا x,y,z = 0,0,0 serial = "you serial here" MyCar = createVehicle(411,x,y,z) addEventHandler("onVehicleEnter",root, function (player,seat) if ( source == MyCar ) then if ( getPlayerSerial(player) == serial ) then outputChatBox("Welcome Back",player,0,255,0) else removePedFromVehicle(player) outputChatBox("This Car is Not Your",player,255,0,0) end end end ) Link to comment
кιηg-αвα∂у Posted November 20, 2012 Author Share Posted November 20, 2012 جرب ذا x,y,z = 0,0,0 serial = "you serial here" MyCar = createVehicle(411,x,y,z) addEventHandler("onVehicleEnter",root, function (player,seat) if ( source == MyCar ) then if ( getPlayerSerial(player) == serial ) then outputChatBox("Welcome Back",player,0,255,0) else removePedFromVehicle(player) outputChatBox("This Car is Not Your",player,255,0,0) end end end ) الكود شغال مشكور بس المشكلة يمدي اي احد يركب وينزلني بعدين الكود يطلعه من السيارة يعني لما تركب ويكون سريالك غير يطلعك انا ابيه يشيك على سريالك اذا غير يكنسل الوضيفة ممكن تعدله x,y,z = 1520.0999755859,2754,10.60000038147 rx,ry,rz = 0,0,90 serial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" MyCar = createVehicle(562,x,y,z,rx,ry,rz) addEventHandler("onVehicleEnter",root, function (player,seat) if ( source == MyCar ) then if ( getPlayerSerial(player) == serial ) then outputChatBox("Welcome Back",player,0,255,0) else removePedFromVehicle(player) outputChatBox("This Car is Not Your",player,255,0,0) end end end ) Link to comment
==>ҭᾄlᾄl Posted November 20, 2012 Share Posted November 20, 2012 مافيه كنسل لاكن في اقفال Link to comment
./BlackBird# Posted November 20, 2012 Share Posted November 20, 2012 شوف كودي انا مجربه من زمان Link to comment
3NAD Posted November 20, 2012 Share Posted November 20, 2012 theSerial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" createVehicle ( 562, 1520, 2754, 11, 0, 0, 90 ) addEventHandler ( "onVehicleStartEnter", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getPlayerSerial ( thePlayer ) ~= theSerial then outputChatBox ( "* Private Car !!", thePlayer, 255, 0, 0, true ) cancelEvent ( ) end end ) Link to comment
|Mr|-Talal07-| Posted November 20, 2012 Share Posted November 20, 2012 x,y,z = 1520.0999755859,2754,10.60000038147 rx,ry,rz = 0,0,90 serial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" MyCar = createVehicle(562,x,y,z,rx,ry,rz) addEventHandler("onVehicleEnter",root, function (player,seat) if ( source == MyCar ) then if ( seat == 0 ) then if ( getPlayerSerial(player) == serial ) then outputChatBox("Welcome Back",player,0,255,0) else removePedFromVehicle(player) outputChatBox("This Car is Not Your",player,255,0,0) end else outputChatBox("This Car is Not Your",player,255,0,0) end end end ) Link to comment
кιηg-αвα∂у Posted November 20, 2012 Author Share Posted November 20, 2012 مافيه كنسل لاكن في اقفال في كنسل https://wiki.multitheftauto.com/wiki/CancelEvent حاولت اسويه بس ماضبط ممكن تسويه لي Link to comment
кιηg-αвα∂у Posted November 20, 2012 Author Share Posted November 20, 2012 theSerial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" createVehicle ( 562, 1520, 2754, 11, 0, 0, 90 ) addEventHandler ( "onVehicleStartEnter", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getPlayerSerial ( thePlayer ) ~= theSerial then outputChatBox ( "* Private Car !!", thePlayer, 255, 0, 0, true ) cancelEvent ( ) end end ) كودك مو شغال وش الخطأ في هاذه x,y,z = 1520.0999755859,2754,10.60000038147 rx,ry,rz = 0,0,90 serial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" MyCar = createVehicle(562,x,y,z,rx,ry,rz) addEventHandler("onVehicleEnter",root, function (player,seat) if ( source == MyCar ) then if ( seat == 0 ) then if ( getPlayerSerial(player) == serial ) then outputChatBox("Welcome Back",player,0,255,0) else cancelEvent ( ) outputChatBox("This Car is Not Your",player,255,0,0) end else outputChatBox("This Car is Not Your",player,255,0,0) end end end ) Link to comment
iPrestege Posted November 20, 2012 Share Posted November 20, 2012 theSerial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" createVehicle ( 562, 1520, 2754, 11, 0, 0, 90 ) addEventHandler ( "onVehicleStartEnter", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getPlayerSerial ( thePlayer ) ~= theSerial then outputChatBox ( "* Private Car !!", thePlayer, 255, 0, 0, true ) cancelEvent ( ) end end ) Link to comment
3NAD Posted November 20, 2012 Share Posted November 20, 2012 theSerial = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" createVehicle ( 562, 1520, 2754, 11, 0, 0, 90 ) addEventHandler ( "onVehicleStartEnter", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getPlayerSerial ( thePlayer ) ~= theSerial then outputChatBox ( "* Private Car !!", thePlayer, 255, 0, 0, true ) cancelEvent ( ) end end ) كودك مو شغال تأكد انه سيرفر ="FileName.lua" type="server" /> Link to comment
кιηg-αвα∂у Posted November 20, 2012 Author Share Posted November 20, 2012 ضبط معاي مشكورين كلكم Link to comment
==>ҭᾄlᾄl Posted November 20, 2012 Share Posted November 20, 2012 مافيه كنسل لاكن في اقفال في كنسل https://wiki.multitheftauto.com/wiki/CancelEvent حاولت اسويه بس ماضبط ممكن تسويه لي اذكر اني شفت في موضوع ان الكنسل ما ينفع مع افنت ركوب السياره Link to comment
TAPL Posted November 20, 2012 Share Posted November 20, 2012 مافيه كنسل لاكن في اقفال في كنسل https://wiki.multitheftauto.com/wiki/CancelEvent حاولت اسويه بس ماضبط ممكن تسويه لي اذكر اني شفت في موضوع ان الكنسل ما ينفع مع افنت ركوب السياره https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter CancelingIf this event is canceled, the player will not enter the vehicle. 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