Posts: 280
Threads: 62
Joined: Aug 2014
Reputation:
0
is there a way to get a ip from a account through scriptfile? if yes, can you show me?
Posts: 270
Threads: 7
Joined: Apr 2015
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.
Posts: 1,351
Threads: 35
Joined: Sep 2011
Reputation:
0
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.)
Posts: 882
Threads: 50
Joined: Jun 2012
Reputation:
0
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.
Posts: 280
Threads: 62
Joined: Aug 2014
Reputation:
0
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)
Posts: 2,593
Threads: 34
Joined: Dec 2007
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
Just make a variable something like "UnbanIP" and save it. Then when they are being unbanned, load that string into memory and unban it.
Posts: 2,593
Threads: 34
Joined: Dec 2007
and what you to do with this ip? you want for specific player name or search all players with this ip?