16.06.2009, 17:16
Quote:
Originally Posted by Ash0153
Hello.
I've found this script to save a player's IP to a file: Код:
new File:ip = fopen("ip.log", io_readwrite); new string[100], pName[24], pIp[20]; if(ip) { GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerIp(playerid, pIp, sizeof(pIp)); format(string, sizeof(string), "%s - %s \n", pIp, pName); fwrite(ip, string); fclose(ip); } Credits go to ZeroBurn who permits to code to be used by anyone. Thank you in advance! |
Код:
new File:ip = fopen("ip.log", io_readwrite); new string[100], pName[24], pIp[20]; if(ip) { for(new i = 0; i < MAX_PLAYERS; i++) { GetPlayerName(i, pName, sizeof(pName)); GetPlayerIp(i, pIp, sizeof(pIp)); format(string, sizeof(string), "%s - %s \n", pIp, pName); fwrite(ip, string); } fclose(ip); }