Jump to content

Recommended Posts

Вообщем, такая проблема, скрипт работает, но все-равно идут варнинги и ерорры в консоль.

function enLVPD2(source, interior, vehicle) 
	 local vehicle = getPedOccupiedVehicle(source)
	 if vehicle then
		outputChatBox("* Выйдите из Т/С", source, 255, 255, 0)
		else
      local accName = getAccountName ( getPlayerAccount ( source ) )
	if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LVPD" and "Admin" ) ) then
        setElementInterior ( source, 3, 238.68228, 141.67117, 1003.02344 )
	else
	outputChatBox("*У Вас нет пропуска", thaPlayer, 255, 255, 0)
	end		
end 
end
addEventHandler ("onMarkerHit", enLVPD, enLVPD2 )

Bad argument @ 'getPedOccupiedVhicle [Expected ped at argument 1, got vehicle]
Bad argument @ 'getPlayerAccount [Expected player or console at argument 1, got vehicle]
Bad argument @ 'getAccountName [Expected ped at argument 1, got boolean]
attemp to concatenats local 'accname <a boolean value>

Заранее спасибо :)

Link to comment
function enLVPD2(source, interior, vehicle) 
	if(getElementType(source) == "player") then
		local vehicle = getPedOccupiedVehicle(source)
		if vehicle then
			outputChatBox("* Выйдите из Т/С", source, 255, 255, 0)
		else
			local accName = getAccountName ( getPlayerAccount ( source ) )
			if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LVPD" and "Admin" ) ) then
				setElementInterior ( source, 3, 238.68228, 141.67117, 1003.02344 )
			else
				outputChatBox("*У Вас нет пропуска", thaPlayer, 255, 255, 0)
			end		
		end 
	end
end
addEventHandler ("onMarkerHit", m, enLVPD2 )

 

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