xE//XenO

Race Problem

Recommended Posts

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?

Share this post


Link to post

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

Share this post


Link to post
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 :/

Share this post


Link to post

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.

Share this post


Link to post
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!

Share this post


Link to post

Post what edits you made if you can, it could be useful for who have your same porblem

Share this post


Link to post

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

Share this post


Link to post

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 1

Share this post


Link to post

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.