The online racing simulator
Does not show IPAddress when connected to server
Shows IPAddress when someone leaves the server but not when someone joins the server

Sub dcgiris($username)
$denemex = GetCurrentPlayerVar("IPAddress");
$Message = ">>> `" . GetCurrentPlayerVar("UserName" ) . "` joined the server. `".$IPAddress." " . getLapperVar( "ShortTime" ) ."` ";
$DiscordChannel = "1116093537629524108";
sendmessagetodiscord($DiscordChannel,$Message);
EndSub
Sub dccikis($username)
$Message = ">>> `" . $username . "` left the server. `".GetPlayerVar( $username,IPAddress)."` `" . getLapperVar( "ShortTime" ) ."` ";
$DiscordChannel = "1116093537629524108";
sendmessagetodiscord($DiscordChannel,$Message);
EndSub

I tried other markers I could think of but without success
I tried a few other tokens I can think of but without success
Attached images
Ekran Görüntüsü (997).png
** Best answer **
There is an delay between joining the server and set the ipaddress player value.
I recommend to set a delay of 2 a 3 seconds between OnConnect() Event and sending the discordmessage.

Edit: Sending messages on the phone is not ideal Tongue
Quote from Bass-Driver :There is an delay between joining the server and set the ipaddress player value.
I recommend to set a delay of 2 a 3 seconds when the player joins and and sending the discordmessage.

I solved it with 1 second delay, thanks for everyth
Quote from arda556 :I solved it with 1 second delay, thanks for everyth

So how did you set the delay? Can you help me?
Quote from lfsteamalper :So how did you set the delay? Can you help me?

Event OnConnect( $userName ) # Player event


PrivDelayedCommand( 1, dcgiris );
EndEvent

This may solve your problem.

FGED GREDG RDFGDR GSFDG