RLP[Farouk] Posted September 25, 2012 Share Posted September 25, 2012 السلام عليكم شباب بدي كود يظهر الكلام في الشاشه مش بالشات مثلا, انا حرامي وبدي اركب سيارة شرطة وبكتب You can not enter the vehicle الكلام ده بدي يطلع في الشاشة في اي مكان تحت او فوق مش بالشات Link to comment
RLP[Farouk] Posted September 25, 2012 Author Share Posted September 25, 2012 ممكن تحط مثال كامل وانا اعدل عليه؟؟ Link to comment
Tete omar Posted September 25, 2012 Share Posted September 25, 2012 استخدم guiCreateLabel او من الاسهل كـ مبرمج مبتدئ حمل guieditor https://community.multitheftauto.com/ind ... ils&id=141 Link to comment
RLP[Farouk] Posted September 25, 2012 Author Share Posted September 25, 2012 شباب هيك صح ؟؟؟ function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() dxDrawText ( "*You can't get in this vehicle.", player , 255, 00, 00) end end Link to comment
3NAD Posted September 25, 2012 Share Posted September 25, 2012 dxDrawText ( text, left, top ) -- Example dxDrawText ( "*You can't get in this vehicle.", 50, 25 ) gui Label والأسهل استخدام Link to comment
RLP[Farouk] Posted September 25, 2012 Author Share Posted September 25, 2012 طيب هيك مظبوط؟؟؟ function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() GUIEditor_Label[1] = guiCreateLabel(328,549,157,19,"You can't enter this vehicle.",false) end end شباب رجاءً تحملوني شوي Link to comment
3NAD Posted September 25, 2012 Share Posted September 25, 2012 Client Side theLabel = guiCreateLabel(328,549,157,19,"",false) addEvent("EnterNote",true) addEventHandler("EnterNote",root, function() guiSetText(theLabel,"You can't enter this vehicle.") end ) addEvent("ExitNote",true) addEventHandler("ExitNote",root, function() guiSetText(theLabel,"") end ) Server Side function lockenterVehicle ( thePlayer ) local ID = getElementModel(getPedOccupiedVehicle(thePlayer)) if ( ID == 596 or ID == 597 or ID == 598 or ID == 599 ) then cancelEvent() triggerClientEvent(thePlayer,"EnterNote",thePlayer) end end addEventHandler("onVehicleEnter",root,lockenterVehicle) function ExitVehicle ( thePlayer ) triggerClientEvent(thePlayer,"ExitNote",thePlayer) end addEventHandler("onVehicleExit",root,ExitVehicle) Link to comment
RLP[Farouk] Posted September 26, 2012 Author Share Posted September 26, 2012 مش ظابطه معي بعطيكم الكود كامل انا ما عدلت عليه شي سيرفر lockVehicles = { [470]=true } --sets the lock vehicles lockSkins = { [287] =true } -- sets the lock skins lockMedicVeiculos = { [416] = true ; } -- sets the lock skins lockMedicSkin = { [274] = true ; [275] = true ; [276] = true ; } -- sets the lock skins lockBomberVehicle = { [277] = true ; [407] = true ; [544] = true ; } -- sets the lock skins lockBomberSkin = { [277] = true ; [278] = true ; [279] = true ; } -- sets the lock skins lockPoliceVeiculos = { [598] = true ; [523] = true ; [427] = true ; [596] = true ; [597] = true ; [599] = true ; [428] = true ; [601] = true ; } -- sets the lock skins lockPoliceSkin = { [280] = true ; [281] = true ; [282] = true ; [283] = true ; [284] = true ; [285] = true ; [286] = true ; [287] = true ; [288] = true ; } -- sets the lock skins function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockenterVehicle ) function lockPolice ( player, seat, jacked ) if ( lockPoliceVeiculos[getElementModel ( source )] ) and ( not lockPoliceSkin[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPolice ) function lockMedic ( player, seat, jacked ) if ( lockMedicVeiculos[getElementModel ( source )] ) and ( not lockMedicSkin[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockMedic ) function lockBomber ( player, seat, jacked ) if ( lockBomberVehicle[getElementModel ( source )] ) and ( not lockBomberSkin[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockBomber ) Link to comment
MR.S3D Posted September 26, 2012 Share Posted September 26, 2012 هذا الكود شغال بدله بدل كودك وبعدين مايحتاج انك كل مره تكرر نفس الحدث onVehicleStartEnter lockVehicles = { [470]=true } --sets the lock vehicles lockSkins = { [287] =true } -- sets the lock skins lockMedicVeiculos = { [416] = true ; } -- sets the lock skins lockMedicSkin = { [274] = true ; [275] = true ; [276] = true ; } -- sets the lock skins lockBomberVehicle = { [277] = true ; [407] = true ; [544] = true ; } -- sets the lock skins lockBomberSkin = { [277] = true ; [278] = true ; [279] = true ; } -- sets the lock skins lockPoliceVeiculos = { [598] = true ; [523] = true ; [427] = true ; [596] = true ; [597] = true ; [599] = true ; [428] = true ; [601] = true ; } -- sets the lock skins lockPoliceSkin = { [280] = true ; [281] = true ; [282] = true ; [283] = true ; [284] = true ; [285] = true ; [286] = true ; [287] = true ; [288] = true ; } -- sets the lock skins function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles [ getElementModel ( source ) ] ) and ( not lockSkins [ getElementModel ( player ) ] ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) elseif ( lockPoliceVeiculos [ getElementModel ( source ) ] ) and ( not lockPoliceSkin [ getElementModel ( player ) ] ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) elseif ( lockMedicVeiculos [ getElementModel ( source ) ] ) and ( not lockMedicSkin [ getElementModel ( player ) ] ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) elseif ( lockBomberVehicle [ getElementModel ( source ) ] ) and ( not lockBomberSkin [ getElementModel ( player ) ] ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockenterVehicle ) 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