Guest Posted July 14, 2018 Share Posted July 14, 2018 شباب سويت هذا الكود عشان اخلي الفيب ما يقدر يدخل الطائرة بس مازلت قادر ادخل الطائرة حتى و انا مش فيب vipVehicles = { [520]=true } function onVehicleStartEnter ( enteringPlayer, seat, jacked, door ) local accName = getAccountName ( getPlayerAccount ( enteringPlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then removePedFromVehicle ( thePlayer ) else outputChatBox ( "● You must be vip to enter this vehicle", thePlayer, 0, 255, 0 ) -- and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), onVehicleStartEnter ) Link to comment
Trefeor Posted July 14, 2018 Share Posted July 14, 2018 local veh = { [525] = true, } addEventHandler("onVehicleStartEnter",root,function(enter) if ( not isGuestAccount ( getPlayerAccount ( enter ) ) ) then if ( veh[getElementModel(source)] and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(enter)),aclGetGroup("VIP")) ) then cancelEvent ( ) outputChatBox("You Don't have vip",enter,255,0,0,true) end end end ) ; Link to comment
Guest Posted July 14, 2018 Share Posted July 14, 2018 (edited) اخوي هو سيرفر فريروم كيف اخليهم ما يقدرون ينزلونها بكتابة /cv hydra أسف على إزعاج و شكرا لك Edited July 14, 2018 by Guest Link to comment
Trefeor Posted July 14, 2018 Share Posted July 14, 2018 روح عدلها من الفري روم من ملف fr_client.lua وتحقق ان الايدي ماهو اي دي السيارة الي ماتبيه يحطها اسم الفنكشن الي بالفري روم الي يعطي سيارة createVehicleCommand Link to comment
Guest Posted July 14, 2018 Share Posted July 14, 2018 (edited) --------------------------------------- --Restriced vehicle --------------------------------------- vipVehicles = { [520]=true, [432]=true} function createVehicleCommand(cmd, ...) local accName = getAccountName ( getPlayerAccount ( createVehicleCommand ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then elseif ( vipVehicles[getElementModel(source)] ) and not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then cancelEvent() outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) end end addCommandHandler('createvehicle', createVehicleCommand) addCommandHandler('cv', createVehicleCommand) وين الأخطاء؟ أنا جديد بالبرمجة Edited July 14, 2018 by Guest Link to comment
Trefeor Posted July 14, 2018 Share Posted July 14, 2018 local vipCar = { [520] = true , [423] = true } function createVehicleCommand(cmd, ...) local args = {...} vehID = getVehicleModelFromName(table.concat(args," ")) or tonumber(args[1]) and math.floor(tonumber(args[1])) or false if vehID and vehID >= 400 and vehID <= 611 then if ( not vipCar [ vehID ] ) then server.giveMeVehicles(vehID) else outputChatBox("you can't create this car",255,0,0,true) end else errMsg("Invalid vehicle model") end end addCommandHandler('createvehicle', createVehicleCommand) addCommandHandler('cv', createVehicleCommand) Link to comment
Rockyz Posted July 14, 2018 Share Posted July 14, 2018 @Trefeor server.giveMeVehicles ?? errMsg ?? Link to comment
SycroX Posted July 14, 2018 Share Posted July 14, 2018 (edited) 3 hours ago, Scarfas said: اخوي هو سيرفر فريروم كيف اخليهم ما يقدرون ينزلونها بكتابة /cv hydra أسف على إزعاج و شكرا لك addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "cv" then setTimer(function(source) local p = {getElementPosition(source)} for _,vehicle in ipairs(getElementsByType("vehicle")) do if getElementModel(vehicle) == 520 then local v = {getElementPosition(vehicle)} if getDistanceBetweenPoints3D(p[1], p[2], p[3], v[1], v[2], v[3]) < 10 then destroyElement(vehicle) end end end end, 1000, 1, source) end end ) Edited July 14, 2018 by #َxLysandeR Link to comment
Guest Posted July 14, 2018 Share Posted July 14, 2018 عدلت عليه عشان ما يقدر اصلا ينزل الطائرة كمان تجيه رسالة بس ما اشتغل يقلي الخطأ في السطر رقم16 كمان قلي ليش تكفى addEventHandler("onPlayerCommand", root, function(cmd) local accName = getAccountName ( getPlayerAccount ( cmd ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then if cmd == "cv" then local accName = getAccountName ( getPlayerAccount ( cmd ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) -- local p = {getElementPosition(source)} for _,vehicle in ipairs(getElementsByType("vehicle")) do if getElementModel(vehicle) == 520 then local v = {getElementPosition(vehicle)} if getDistanceBetweenPoints3D(p[1], p[2], p[3], v[1], v[2], v[3]) < 10 then destroyElement(vehicle) end end end end end end end ) Link to comment
+1HidroNex Posted July 14, 2018 Share Posted July 14, 2018 16 = end ولاعندك زايده ولا شي ايش الغلط الى يقلك إياه ال ديبق ؟ # Link to comment
#Major . Posted July 14, 2018 Share Posted July 14, 2018 33 minutes ago, +1HidroNex said: 16 = end ولاعندك زايده ولا شي ايش الغلط الى يقلك إياه ال ديبق ؟ # م فيه شي زايد Link to comment
+1HidroNex Posted July 14, 2018 Share Posted July 14, 2018 طيب انا اقله مافيه غلط في الصطر 16 ولاعندك, end زايد # Link to comment
#Major . Posted July 14, 2018 Share Posted July 14, 2018 5 hours ago, Scarfas said: عدلت عليه عشان ما يقدر اصلا ينزل الطائرة كمان تجيه رسالة بس ما اشتغل يقلي الخطأ في السطر رقم16 كمان قلي ليش تكفى addEventHandler("onPlayerCommand", root, function(cmd) local accName = getAccountName ( getPlayerAccount ( cmd ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then if cmd == "cv" then local accName = getAccountName ( getPlayerAccount ( cmd ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) -- local p = {getElementPosition(source)} for _,vehicle in ipairs(getElementsByType("vehicle")) do if getElementModel(vehicle) == 520 then local v = {getElementPosition(vehicle)} if getDistanceBetweenPoints3D(p[1], p[2], p[3], v[1], v[2], v[3]) < 10 then destroyElement(vehicle) end end end end end end end ) كودك تخبيص في تخبيص انت تدري وش قاعد تسوي ي اخ؟ Link to comment
#Major . Posted July 15, 2018 Share Posted July 15, 2018 كيف تحقق ان معه فيب بعدين تتحق انه م معه فيب؟ Link to comment
SycroX Posted July 15, 2018 Share Posted July 15, 2018 local vipVehicles = { [520] = true; } addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "cv" then setTimer(function(source) local p = {getElementPosition(source)} for _,vehicle in ipairs(getElementsByType("vehicle")) do if vipVehicles[getElementModel(vehicle)] then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("VIP")) then local v = {getElementPosition(vehicle)} if getDistanceBetweenPoints3D(p[1], p[2], p[3], v[1], v[2], v[3]) < 10 then destroyElement(vehicle) end outputChatBox("● You must be VIP to spawn this vehicle", source, 255, 0, 0) end end end end, 1000, 1, source) end end ) Link to comment
Trefeor Posted July 15, 2018 Share Posted July 15, 2018 13 hours ago, #,+( _xiRoc[K]; > said: @Trefeor server.giveMeVehicles ?? errMsg ?? هذا الكود من الفري روم وانا عدلته له Link to comment
Guest Posted July 15, 2018 Share Posted July 15, 2018 On 15/07/2018 at 02:24, *RayaN-Alharbi. said: كيف تحقق ان معه فيب بعدين تتحق انه م معه فيب؟ انا قصدي لو معه فيب يقدر ينزلها و لو مو معو فيب ما يقدر و تجيه هذيك الرسالة انا مازلت مبتدأ 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