Jump to content

Anti-Car Stealing.


uniunicorn

Recommended Posts

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

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