CheckBan(playerid)
{
new DBResult:Resultado,
Query[200],
pIp[25]
;
GetPlayerIp(playerid, pIp, sizeof(pIp));
format(Query,sizeof(Query),"SELECT * FROM `Banidos` WHERE `IP` = '%s'", pIp);
Resultado = db_query(Handle, Query);
if(db_num_rows(Resultado) != 0)
{
SendClientMessage(playerid,Amarelo,"SERVER:"intBranco" Vocк estб banido do servidor!");
new str[150],
Campo[50]
;
db_get_field_assoc(Resultado,"Motivo",Campo,50);
format(pInfo[playerid][pBanMotivo],50, Campo);
db_get_field_assoc(Resultado,"Admin",Campo,50);
format(pInfo[playerid][pBanAdmin],25, Campo);
db_get_field_assoc(Resultado,"DiaMesAno",Campo,50);
format(pInfo[playerid][pBanData],30, Campo);
db_get_field_assoc(Resultado,"HoraMinutoSegundo",Campo,50);
format(pInfo[playerid][pBanHora],30, Campo);
format(str,sizeof(str),"SERVER:"intBranco"Informaзхes: | Motivo: %s | Data: %s | Hora: %s | Admin: %s",
pInfo[playerid][pBanMotivo],
pInfo[playerid][pBanData],
pInfo[playerid][pBanHora],
pInfo[playerid][pBanAdmin]
);
SendClientMessage(playerid,Amarelo,str);
SendClientMessage(playerid,-1,"Nosso site: www.site.com/forum");
Kick(playerid);
}
db_free_result(Resultado);
return 1;
}
I need a Translator to fix that code Translate it if you please and i ll fix the code and about OnPlayerConnect thing well as all the registering systems and login system , admin systems etc.. check if the user exists and loads / registers an account its all under the player connect function so its not related either by OnPlayerConnect or OnPlayerDisconnect because all in all it has to be saved in the account's file that a variable called PlayerBanned(as an example) equals to 0 if he is not banned and 1 if he is so he gets banned the variable in his profile automatically turns out to be 1 so he logs in with this account its blocked and about the ip the profile of the player has to inculde the GetPlayerIp Feature so as the same time his account gets banned his retrieved ip from this account gets banned as well so its a range ban.. i hope you got it
|
Holy hell, dude! Punctuation exists for a reason + that I needed a translator for THAT response
|