14.12.2014, 16:21
You could use the SQL LIKE statement to select rows which have a similar IP address to ones that are banned, then do additional checks from there to see if the person is evading a ban?
SAMP doesn't use a serial system, so IP banning is the closest you're going to get.
SAMP doesn't use a serial system, so IP banning is the closest you're going to get.
Код:
// Check IP Ban Evading by comparing the IP to similar banned IPs // Assumes you have the IP of the player stored as "Player[playerid][pIP]" new ipp[12]; format(ipp,12,"%s",Player[playerid][pIP]); new sql[128]; format(sql,128,"SELECT * FROM bans WHERE ip LIKE %%s",ipp); new DBResult:res = db_query(db_handle,sql); // At this point it will basically have a set of bans for which the first 12 characters of the IP are the same. if(db_num_rows(res) > 0) { // Additional checks for IP Ban Evading }