Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stockerip(playerid)// on sauvegarder toutes les IP
- {
- new tmpp[32],string[256], tmp[256];
- GetPlayerIp(playerid, tmpp, 32);
- new File:file = fopen("fichier.txt", io_read);
- while(fread(file, string)) //reads the file line-by-line
- {
- if(strcmp(string, tmpp, true) == 0)
- {
- fclose (file);
- }
- else
- {
- format(tmp, sizeof(tmp), "%s\r\n",tmpp);
- fwrite(file, tmp);
- fclose(file);
- }
- }
- }
- verifip(playerid)// On vérifie si cette IP est présente dans le fichier texte
- {
- new tmpp[32],string[256], tmp[256];
- GetPlayerIp(playerid, tmpp, 32);
- new File:file = fopen("fichier.txt", io_read);
- while(fread(file, string)) //reads the file line-by-line
- {
- if(strcmp(string, tmpp, true) == 0)
- {
- fclose (file);
- format(string1, sizeof(string1), "[ADMIN] %s (ID: %d) a été kické pour double compte", initialname[playerid],playerid);
- SendClientMessageToAll(COLOR_INFO, string1);
- Kick(playerid);
- }
- else
- {
- format(tmp, sizeof(tmp), "%s\r\n",tmpp);
- fwrite(file, tmp);
- fclose(file);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement