Jump to content

شباب ارجوكم مساعدة


Guest

Recommended Posts

شباب سويت هذا الكود عشان اخلي الفيب ما يقدر يدخل الطائرة بس مازلت قادر ادخل الطائرة حتى و انا مش فيب

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
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

اخوي هو سيرفر فريروم كيف اخليهم ما يقدرون ينزلونها بكتابة 

/cv hydra

أسف على إزعاج و شكرا لك

Edited by Guest
Link to comment

روح عدلها من الفري روم من ملف fr_client.lua

وتحقق ان الايدي ماهو اي دي السيارة الي ماتبيه يحطها

اسم الفنكشن الي بالفري روم الي يعطي سيارة

createVehicleCommand

Link to comment
---------------------------------------
--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 by Guest
Link to comment
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
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 by #َxLysandeR
Link to comment

عدلت عليه عشان ما يقدر اصلا ينزل الطائرة كمان تجيه رسالة

بس ما اشتغل يقلي الخطأ في السطر رقم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
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
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
On 15/07/2018 at 02:24, *RayaN-Alharbi. said:

كيف تحقق ان معه فيب بعدين تتحق انه م معه فيب؟

انا قصدي لو معه فيب يقدر ينزلها و لو مو معو فيب ما يقدر و تجيه هذيك الرسالة

انا مازلت مبتدأ

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...