07.04.2013, 09:12
PHP Code:
public OnPlayerConnect(playerid) {
new plname[MAX_PLAYER_NAME],query[128];
GetPlayerName(playerid,plname,sizeof(plname));
format(query,sizeof(query),"SELECT * FROM `table_name` WHERE `Name` = '%s'",plname);
mysql_function_query(handle,query,true,"BlackList","d",playerid);
return 1;
}
forward BlackList(playerid);
public BlackList(playerid) {
new rows,fields;
cache_get_data(rows,fields);
if(rows != 0) {
// он в списке
// SendClientMessage(playerid,-1,"Вы в черном списке");
}
else {
// не в списке
}
return 1;
}