16.08.2013, 22:02
Hi !
I've scripted a ban check when a player conect to my server but the script doesn't works..
This is the script:
If you want more information about that, just ask me here. That is the result in game:
Thanks you for reading, bye
PS: I'm french, so I'm sorry about eventual misspellings. Thx for your comprehension.
I've scripted a ban check when a player conect to my server but the script doesn't works..
This is the script:
Код:
// // // new arrCoords[3][252]; new strFromFile2[256]; new File: BanCheckNom = fopen("bannom.cfg", io_read); if (BanCheckNom != File:0) { new idx; new playercheck [25]; new string [252]; new CheckPlayer; new CheckAdmin; new CheckRaison; while (idx < 1000) { fread(BanCheckNom, strFromFile2); split(strFromFile2, arrCoords, ','); CheckPlayer = strlen(arrCoords[0]); CheckAdmin = strlen(arrCoords[1]); CheckRaison = strlen(arrCoords[2]); GetPlayerName(playerid, playercheck, sizeof(playercheck)); if(strcmp(playercheck, arrCoords[0], true) == 0) { format(string, sizeof(string), "____________________________________________________BAN_____________________________________________________________"); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string), " BANNI DU SERVEUR"); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "l'Admin %s vous a banni du serveur. Votre compte est bloquй. Vous devez demander un dйbanissement a l'adresse suivante:", CheckAdmin); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string), "Adresse pour les demandes de dйbanissement: jeroml@hotmail.fr, vous devrez fournir un screen de ce messages et des explications."); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string), "INFO: Vous avez йtй identifiй dans les fichiers de banissement en tant que : %s, si ce n'est pas vous, contactez l'Admin.", CheckPlayer); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string), "Vous avez йtй banni du serveur pour la raison suivante: %s.", CheckRaison); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "N'oubliez pas de prendre un screen de ce message а l'aide de la touche F8 de votre clavier. Tout le message doit apparaitre."); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "Les screens de SA-MP s'enregistrent dans le dossier C: ... Mes Documents .. GTA San Andreas User Files .. screens"); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "___________________________________________________________________________________________________________________"); SendClientMessage(playerid, COLOR_GREY, string); SetTimerEx("KickPublic", 500, 0, "d", playerid); fclose(BanCheckNom); return 1; } idx++; } fclose(BanCheckNom); } // // //
Quote:
[23:42:42] __________________________________________________ __BAN_____________________________________________ ________________ [23:42:42] BANNI DU SERVEUR [23:42:42] Adresse pour les demandes de dйbanissement: jeroml@hotmail.fr, vous devrez fournir un screen de ce messages et des explications. [23:42:42] N'oubliez pas de prendre un screen de ce message а l'aide de la touche F8 de votre clavier. Tout le message doit apparaitre. [23:42:42] Les screens de SA-MP s'enregistrent dans le dossier C: ... Mes Documents .. GTA San Andreas User Files .. screens [23:42:42] __________________________________________________ __________________________________________________ _______________ [23:42:42] Server closed the connection. |
PS: I'm french, so I'm sorry about eventual misspellings. Thx for your comprehension.