Jump to content

Race Problem


xE//XenO

Recommended Posts

Posted

When i play with my friends sometimes i have this problem

 

Race integrity test fail: Invalid vehicle for player (player name)
Race integrity test fail: Invalid vehicle for player (player name)
Race script integrity compromised - Restarting

any help :x?

Posted

That happens if you destroy player's vehicle. Maybe your script is doing it or one of your friends is trolling you (if he's an admin).

Posted
32 minutes ago, GTX said:

That happens if you destroy player's vehicle. Maybe your script is doing it or one of your friends is trolling you (if he's an admin).

he isnt admin :/

  • 3 weeks later...
Posted
22 hours ago, koragg said:

I'm also interested in this as I have had it at some point as well, though not recently and when it did happen, it was rare.

i fixed it just i needed to remove something from 2 race files and done :D!

Posted

In race_server.lua delete 

------------------------
-- Script integrity test

g_IntegrityFailCount = 0
TimerManager.createTimerFor("raceresource","integrity"):setTimer(
    function ()
        local fail = false
        -- Make sure all vehicles are valid - Invalid vehicles really mess up the race script
        for player,vehicle in pairs(g_Vehicles) do
            if not isElement(vehicle) then
                fail = true
                outputRace( "Race integrity test fail: Invalid vehicle for player " .. tostring(getPlayerName(player)) )
                kickPlayer( player, nil, "Connection terminated to protect the core" )
            end
        end

        -- Increment or reset fail counter
        g_IntegrityFailCount = fail and g_IntegrityFailCount + 1 or 0

        -- Two fails in a row triggers a script restart
        if g_IntegrityFailCount > 1 then
            outputRace( "Race script integrity compromised - Restarting" )
            exports.mapmanager:changeGamemode( getResourceFromName('race') )
        end    
    end,
    1000,0
)
 

In race_client.lua delete

------------------------
-- Script integrity test

setTimer(
    function ()
        if g_Vehicle and not isElement(g_Vehicle) then
            outputChatBox( "Race integrity test fail (client): Your vehicle has been destroyed. Please panic." )
        end
    end,
    1000,0
)
 

  • Like 2
Posted

This problem usually happens on old MTA maps that have been converted to the current format.

Some converts just skip the 'rotation' property of spawnpoints that had the rotation of 0...

IMO the best way to fix this i to find the line in race_server.lua

vehicle = createVehicle(spawnpoint.vehicle, x, y, z, 0, 0, spawnpoint.rotation, plate:sub(1, 8))

and add this just before that line:

if not spawnpoint.rotation then
  spawnpoint.rotation = 0
end

 

  • Like 2

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