TriggerClientEvent takes a second parameter, the player to trigger the event on.
I believe you can get this by doing
OnPlayerConnecting([FromSource] Player source, string playerName)
I don’t know how the C# TriggerClientEvent works but, try passing the player second. If that doesn’t work, try passing the player’s ID (probably called Player.ID)
Ah, thanks I was missing the “[FromSource]” didn’t know how to use
So I was crying all the day because I couldn’t find a way to get the player from the “playerConneting” event and now I know after I changed everything lol.
Thanks by the way
Apparently, the entire clientside script doesn’t work… if I use Debug.WriteLine(); in the constructor it doesn’t show up I don’t know why…
in the __resource.lua there’s written "client_script “nfsv_client.net.dll” and still doesn’t work, why?
don’t forget to check the function under visual studio , for TriggerClientEvent , the player is the first param , second is command , and other can be params