11.01.2011, 17:06
Hi guys. I would ask if you can create a system to save the ip of the player. Who is kind enough to post?
Thank guys.
Thank guys.
public OnPlayerConnect(playerid)
{
new string[256], pname[MAX_PLAYER_NAME], IP[16];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "/User IPs/IP_%s.ini", pname);
dini_Create(string);
dini_Set(string, "UserIP", GetPlayerIP(playerid, IP, sizeof(IP)));
return 1;
}
Carbon, thanks for your work but I would like it without the registration system
|
C:\Users\Gabri\Desktop\[IWG]\gamemodes\Gamemode[IWG].pwn(403) : warning 202: number of arguments does not match definition C:\Users\Gabri\Desktop\[IWG]\gamemodes\Gamemode[IWG].pwn(403) : warning 202: number of arguments does not match definition C:\Users\Gabri\Desktop\[IWG]\gamemodes\Gamemode[IWG].pwn(403) : error 035: argument type mismatch (argument 3) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
dini_Create(string);
dini_Set(string, "UserIP", GetPlayerIp(playerid));
1 Error and 2 warning:
Код:
C:\Users\Gabri\Desktop\[IWG]\gamemodes\Gamemode[IWG].pwn(403) : warning 202: number of arguments does not match definition C:\Users\Gabri\Desktop\[IWG]\gamemodes\Gamemode[IWG].pwn(403) : warning 202: number of arguments does not match definition C:\Users\Gabri\Desktop\[IWG]\gamemodes\Gamemode[IWG].pwn(403) : error 035: argument type mismatch (argument 3) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. PHP код:
|
public OnPlayerConnect(playerid)
{
new string[256], pname[MAX_PLAYER_NAME], IP[16];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "/User IPs/IP_%s.ini", pname);
GetPlayerIp(playerid, IP, sizeof(IP));
dini_Set(string, "UserIP", IP);
dini_Create(string);
return 1;
}