22.05.2016, 00:05
Bom essa jб e a segundo vez que eu tento fazer para verificar ser ele estб ban ou nгo
Jб olhei umas bases sу quer a maioria e tudo em SQLITE, Deu para ter uma noзгo de como fazer mais nгo deu muito certo ai ele acaba falando que o banimento do player acabou
PHP код:
// OnPlayerConnect
CheckBan(playerid);
// Stock
stock CheckBan(playerid)
{
new Admin, Nome, Dias, Motivo;
format(Query, sizeof(Query), "SELECT * FROM `banidos` WHERE `Nome` = '%s'", getPName(playerid));
mysql_function_query(connect, Query, false, "", "");
//cache_get_field_content(0, "Admin", Query, connect), Admin = strval(Query);
//cache_get_field_content(0, "Nome", Query, connect), Nome = strval(Query);
cache_get_field_content(0, "Dia", Query, connect), Dias = strval(Query);
//cache_get_field_content(0, "Motivo", Query, connect), Motivo = strval(Query);
if(Dias < gettime())
{
SendClientMessage(playerid, 0xFF8040AA, "<!> Seu tempo de banimento acabou.");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[SERVER]: Vocк estб banido.");
SetTimerEx("KickP", 1000, false, "i", playerid);
}
return 1;
}


