Could you post the error please?

Sorry I totally forgot Xd

The error is as follows:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET id = @source, name = @name, weapons = @weapons, ped = @ped WHERE id = @sourc' at line 1

did you find the solution? have same issue here…

Try using

INSERT INTO
  players (id, name, weapons, ped)
VALUES
  (@source, @name, @weapons, @ped) ON DUPLICATE KEY
UPDATE
  id = @source,
  name = @name,
  weapons = @weapons,
  ped = @ped

See this reference:

https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html