Jump to content

مشكلة


Recommended Posts

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

هذا جزء من المود

addEvent ("carBuy", true)
addEventHandler( "isPedInVehicle", getRootElement(),
addEventHandler ("carBuy", getRootElement(), 
function(id2, cost2, name2,x, y, z, sRz)
  if (getPlayerMoney (source) >= tonumber(cost2)) then
    outputChatBox ("#006400You Bought A : #FFFFFF" .. name2, source, 255, 255, 255, true)
    outputChatBox ("#006400ID: #FFFFFF" .. id2, source, 255, 255, 255, true)
    outputChatBox ("#006400Costs: #FFFFFF" .. cost2, source, 255, 0, 0, true)
    takePlayerMoney (source, tonumber (cost2))
	local x,y,z = getElementPosition (source)
	local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz )
	warpPedIntoVehicle(source, vehicle)
  else
    outputChatBox ("#006400You Don't Have Enough #FFFFFFMoney", source, 255, 255, 255, true)
	if isPedInVehicle (source) then
	cancelEvent()
	 outputChatBox ("#ff0000Leave your vehicle to spawn another vehicle", source, 255, 255, 255, true)
	 end
  end
end))

ممكن تصليح للمود؟

Link to comment
addEvent("carBuy", true)
addEventHandler("carBuy", getRootElement(), 
function (id2, cost2, name2,x, y, z, sRz)
	if ( getPlayerMoney(source) >= tonumber(cost2) ) then
		if ( getPedOccupiedVehicle(source) ) then
			outputChatBox ("#ff0000Leave your vehicle to spawn another vehicle", source, 255, 255, 255, true)
			return
		end
		outputChatBox ("#006400You Bought A : #FFFFFF" .. name2, source, 255, 255, 255, true)
		outputChatBox ("#006400ID: #FFFFFF" .. id2, source, 255, 255, 255, true)
		outputChatBox ("#006400Costs: #FFFFFF" .. cost2, source, 255, 0, 0, true)
		takePlayerMoney (source, tonumber (cost2))
		local x,y,z = getElementPosition (source)
		local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz )
		warpPedIntoVehicle(source, vehicle)
	else
		outputChatBox ("#006400You Don't Have Enough #FFFFFFMoney", source, 255, 255, 255, true)
	end
end)

 

  • Thanks 1
Link to comment
15 minutes ago, !#NssoR_) said:

addEvent("carBuy", true)
addEventHandler("carBuy", getRootElement(), 
function (id2, cost2, name2,x, y, z, sRz)
	if ( getPlayerMoney(source) >= tonumber(cost2) ) then
		if ( getPedOccupiedVehicle(source) ) then
			outputChatBox ("#ff0000Leave your vehicle to spawn another vehicle", source, 255, 255, 255, true)
			return
		end
		outputChatBox ("#006400You Bought A : #FFFFFF" .. name2, source, 255, 255, 255, true)
		outputChatBox ("#006400ID: #FFFFFF" .. id2, source, 255, 255, 255, true)
		outputChatBox ("#006400Costs: #FFFFFF" .. cost2, source, 255, 0, 0, true)
		takePlayerMoney (source, tonumber (cost2))
		local x,y,z = getElementPosition (source)
		local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz )
		warpPedIntoVehicle(source, vehicle)
	else
		outputChatBox ("#006400You Don't Have Enough #FFFFFFMoney", source, 255, 255, 255, true)
	end
end)

 

من زمان م شفناك تعلق

منورر الحتةةء ي سطى

  • Thanks 1
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...