The online racing simulator
Get ip address
(3 posts, closed, started )
Get ip address
Is there any way that when a user enters the server the "administrator" is shown on a button the IP address of the new user that connects?

I try like this but I do not work


<?php 
Event OnConnect
$userName # Player event

    
obtenerIP$KeyFlags );
EndEvent
?>



<?php 
Sub obtenerIP
$KeyFlags )
IF ( 
UserIsAdmin$userName ) == )
THEN
openPrivButton
"base_obtenerIP1",4,80,32,6,4,3,23,"" );
openPrivButton"base_obtenerIP2",4,80,32,6,4,3,23,"" );
openPrivButton"base_obtenerIP3",4,80,32,6,4,3,23,"" );
openPrivButton"obtenerIP1",5,81,30,4,4,3,32,"" );
openPrivButton"obtenerIP2",5,81,30,4,4,3,32,"" );
openPrivButton"obtenerIP3",5,81,30,4,4,3,32,""GetCurrentPlayerVar "userName" ) . " ^6the IP address is^7: "GetCurrentPlayerVar "IPAddress" ),"" );
ENDIF
EndSub
?>


If someone could correct the code I would appreciate it
First of all, you have to see who's an admin in the server.

You can do this with a foreach Loop


<?php 
$Players 
GetListOfPlayers("U");                  
        FOREACH( 
$Var IN $Players #For each player in the server
            
        
ENDFOREACH
?>

In that loop, you check if the current player in the loop in an admin.


<?php 
IF ( UserIsAdmin$Var["value"] ) == THEN

ENDIF
?>

To open button for a specific player in your current loop using the OpenButton() function.


<?php 
openButton
$Var["value"], "button",175,124,25,5,5,2,96,"");
?>

I see now that, adding the Ipaddress player var to LFSLapper was a bad choice. So many cracked players and i think legal players are using it. This could be a security issue :S I'm sorry for that.

But it was a insimpacket that was kinda easy to implement so yeah uhm.
Quote from Bass-Driver :First of all, you have to see who's an admin in the server.

You can do this with a foreach Loop


<?php 
$Players 
GetListOfPlayers("U");                  
        FOREACH( 
$Var IN $Players #For each player in the server
            
        
ENDFOREACH
?>

In that loop, you check if the current player in the loop in an admin.


<?php 
IF ( UserIsAdmin$Var["value"] ) == THEN

ENDIF
?>

To open button for a specific player in your current loop using the OpenButton() function.


<?php 
openButton
$Var["value"], "button",175,124,25,5,5,2,96,"");
?>

I see now that, adding the Ipaddress player var to LFSLapper was a bad choice. So many cracked players and i think legal players are using it. This could be a security issue :S I'm sorry for that.

But it was a insimpacket that was kinda easy to implement so yeah uhm.

Thanks bro I'll try it!
This thread is closed

Get ip address
(3 posts, closed, started )
FGED GREDG RDFGDR GSFDG