getting a ip from a offline player
#1

is there a way to get a ip from a account through scriptfile? if yes, can you show me?
Reply
#2

You can read files from scriptfiles folder, reading/saving methods are different and you need to save an IP so you can load it later.
Reply
#3

Well, It's useless to give you the code that I use for my GM. One because my GM is MySQL, and two because it just won't work with yours. What I do is, when the player connects, I change a variable on the player's record (for you, the player's file) called LastIP and have their last IP saved there. So when they logout and an admin uses /ocheck (offline check), they can see the last IP that was used to login. Then they can do whatever they want from there (cross-check IP's etc. etc.)
Reply
#4

damn
Reply
#5

This question actually sounds quite silly for me.All I would do is save the last 5 IPs of a player in the player database and retrieve it whenever I need it.

SA-MP doesn't provide any in-built feature using which you can get an IP of an offline player.
Reply
#6

yes it sound silly. but i needed some code for admins to check a player account using some command like /checkip that would search though his account for an ip for unbanning ip.(instead of me going to the scriptfile folder looking for the ip)
Reply
#7

Show this file with ips
Reply
#8

the ip store in the account like this
Quote:

[account]
Ip = 192.168.1.11

Reply
#9

Just make a variable something like "UnbanIP" and save it. Then when they are being unbanned, load that string into memory and unban it.
Reply
#10

and what you to do with this ip? you want for specific player name or search all players with this ip?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)