Jump to content
  • 0

same serial for two players


yvadfulck

Question

hi i have this thing with a player on my server:

the dude joins logs in,and a sec or Two later another player with same serial...same ip...

the first time ive seen it i put a kickscript for the serial,

now the dude just comes with other serial...

my question:is this normal to have this Two players one serial thing going on?

i shurly think you mta guys wont like a serial bug like this...

can anyone give me an solution for this???

Link to comment

10 answers to this question

Recommended Posts

  • 0

If I understood you correctly, you can use this script:

function duplicateSerial(nick, ip, user, serial) 
    for i, p in pairs(getElementsByType("player")) do 
        if (serial == getPlayerSerial(p)) then 
            kickPlayer(p, "Serial in use by somebody who's connecting") 
        end 
    end 
end 
addEventHandler("onPlayerConnect", root, duplicateSerial) 

Edited by Guest
Link to comment
  • 0
If I understood you correctly, you can use this script:
function duplicateSerial(nick, ip, user, serial) 
    for i, p in pairs(getElementsByType("player")) do 
        if (serial == getPlayerSerial(p)) then 
            kickPlayer(p, "Serial in use by connecting player") 
        end 
    end 
end 
addEventHandler("onPlayerConnect", root, duplicateSerial) 

You understanded wrong.

He is asking why it happened and how its possible because he didn't have that script.

Link to comment
  • 0
If I understood you correctly, you can use this script:
  
function duplicateSerial(nick, ip, user, serial) 
    for i, p in pairs(getElementsByType("player")) do 
        if (serial == getPlayerSerial(p)) then 
            kickPlayer(p, "Serial in use by somebody who's connecting") 
        end 
    end 
end 
addEventHandler("onPlayerConnect", root, duplicateSerial) 

actualy this line would be better:

as it kicks both clients and not just the client who is already connected

function serialcheck(nick,ip,username,serial,versionn,versions)

for i,v in ipairs(getElementsByType("player")) do

local pserial = getPlayerSerial(v)

if serial == pserial then

cancelEvent(true,"this serial \" "..serial.." \" is already in use")

kickPlayer(v,"man quit messing")

outputDebugString(serial.." kicked for double")

end

end

end

addEventHandler ( "onPlayerConnect", root, serialcheck )

Link to comment
  • 0

i know

probabely wine on ubuntu

i tested all this..

the result: funny

it was possible to run 2 mta clients the same time on same pc for the same user ...

and i even mannaged for both to have a different serial (lol),

just playing with hardware before mta install

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