Jump to content

Help with Expected player at argument 1, got nil


Kamycz3q

Recommended Posts

9 minutes ago, Dimos7 said:

firstly you not need put arugments for player in join because the souce of than even is player enter the server so change it other than that i don't see anything else

im new in scripting and i do not understand you. Can you give me edited code pls? 

 

function registerRequest(plr)
    local ip = getPlayerIP(plr)
    local serial = getPlayerSerial
    local nazwa = getPlayerName
    local team = getPlayerTeam
    --local variables
    exports.mysql:_Exec("insert into uzytkownicy(nazwa,ip,serial,team) values (?,?,?,?)",nazwa,ip,serial,team)
end

addEventHandler ( "onPlayerJoin", getRootElement(), registerRequest )

 

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