19.05.2010, 14:55
I'm trying to create a simple anti-autoreconect, creating a file named with the IP kicked, and a timer to delete this file after time...
But, without success, the file is not deleted ...
Can anyone help me with this?
Thanks
But, without success, the file is not deleted ...
Can anyone help me with this?
Thanks
pawn Код:
//onplayerdisconnect with reason 2 (kicked)
new ip[16];
GetPlayerIp(playerid,ip,sizeof(ip));
dini_Create(ip);
SetTimerEx("RemoveFile",60000,false,"s",ip);
pawn Код:
//onplayerconnect
new ip[16];
GetPlayerIp(playerid,ip,sizeof(ip));
if(dini_Exists(ip)) Kick(playerid);
pawn Код:
forward RemoveFile(filename[]);
public RemoveFile(filename[])
{
dini_Remove(filename);
}