20.06.2016, 02:23
Hello there, I am experiencing 2 bugs with my ban system
First, since I use strfind, if for example the banned player is "John" and I connect using the name "Johnny"
it marks me as a banned player, how can I prevent this ?
Second, I have 3 triggers under OnPlayerConnect
First: if both playername and playerip exist in the ban file
Second: if only the playername exist in the ban file
Third: if only the player ip exist in the ban file
So, I wanted to ban the IP of a person who logs into a banned account
Code:
I tested it, it doesn't save the IP properly
Thanks in advice
First, since I use strfind, if for example the banned player is "John" and I connect using the name "Johnny"
it marks me as a banned player, how can I prevent this ?
Second, I have 3 triggers under OnPlayerConnect
First: if both playername and playerip exist in the ban file
Second: if only the playername exist in the ban file
Third: if only the player ip exist in the ban file
So, I wanted to ban the IP of a person who logs into a banned account
Code:
PHP Code:
new cdate[3];
getdate(cdate[2], cdate[1], cdate[0]);
format(string, sizeof(string), "%s|The Server|Ban Evasion(%s)|%i|%i|%i", RPIP(playerid), RPN(playerid), cdate[0], cdate[1], cdate[2]);
fwrite(file, string);
fclose(file);
SetTimerEx("DelayedKick", 100, 0, "i", playerid);
return 1;
Thanks in advice