uniunicorn Posted September 27, 2019 Share Posted September 27, 2019 local function canAccessElement( player, element ) if getElementData(player, "dead") == 1 then return false end if getElementType( element ) == "vehicle" then local aracid,oyuncuid = tonumber(getElementData( element, "owner" )),tonumber(getElementData( player, "dbid" )) local aracfact,oyuncufact = tonumber(getElementData(element,"faction")) or false,tonumber(getElementData(player,"faction")) or false if aracid ~= oyuncuid then if aracfact and oyuncufact then if aracfact ~= oyuncufact then outputChatBox("#ee0000[!]#f1f1f1 Sana ait olmayan araçtan eşya alamazsın.", player, 255,0,0, true) return false end else outputChatBox("#ee0000[!]#f1f1f1 Sana ait olmayan araçtan eşya alamazsın.", player, 255,0,0, true) return false end end Guys this function doesn't work on sometimes, the players can steal items on other player's cars. Help me plz. Guys this function doesn't work on sometimes, the players can steal items on other player's cars. Help me plz. Link to comment
Addlibs Posted September 27, 2019 Share Posted September 27, 2019 Which event is canAccessElement attached to? Link to comment
uniunicorn Posted September 27, 2019 Author Share Posted September 27, 2019 For blocking players stealing items from car inventories "Sana ait olmayan araçtan eşya alamazsın" == "You can't get things from a car that doesn't belong to you" 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