MRmihailZH Posted January 11, 2019 Share Posted January 11, 2019 Вообщем, такая проблема, скрипт работает, но все-равно идут варнинги и ерорры в консоль. 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
alexaxel705 Posted January 12, 2019 Share Posted January 12, 2019 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
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