Jump to content
  • 0

pomoc Unban


LosO

Dotaz

Zdravím,

 

Mohly by ste mi prosím poradiť ? robím si ban systém ale trocha som sa zasekol s unbanom poradili by ste ako to spraviť aby to tu IP adresu stoho suboru odstránilo ?

 

teraz to všetko pohode napíše že som dal ub ale neodstrani tu IP zo suboru.

 

tu je kod:

dcmd_unban(playerid,params[])
{
new string[70];
format(string,70,"bany/%s.txt",params);
if(!strlen(params)) return SCM(playerid,c,"[ Server ] {ffffff}Použi: /unban [ Ip ]");
else if(!fexist(string)) return SCM(playerid,c,"[ Server ] {ffffff}Táto Ip adresa neni zabanovaná");
else
{
new File:reportf=fopen(string, io_read);
if(!reportf) SCM(playerid,c,"Nepodarilo sa otvoriť súbor !");
else
{
fremove(string);
Text(c,"Administrátor %s odbanoval IP ADRESU: %s",Jmeno(playerid),params);
}
fclose(reportf);
}
return 1;
}

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0

hm.. skús tým príkazom vytvoriť súbor a tak zistíš, kde je chyba, namiesto fremove daj neviem proste vytvor nový súbor tým príkazom a zistíš, prečo ti ju nezmaže ale ip takú, akú máš

Link to comment
Share on other sites

  • 0
  • Hlavní moderátor

funkce fremove nebude fungovat na otevřený soubor, musíš ho nejprve uzavřít (fclose) a až potom odstranit

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...