Jump to content
  • 0

pomoc Timeban help


vitil

Dotaz

čus.mam udělaný příkaz:

 

 

CMD:tban(playerid,params[])

{

if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,NOTADMIN);

new id,reason[128],string[256],time;

if(sscanf(params,"uI(-1)s[128]",id,time, reason)) return SendClientMessage(playerid,-1,"Použití : /tban [id] [dny] [duvod]");

PlayerInfo[id][pBanTime] = gettime();

PlayerInfo[id][pBanTill] = time * 86400;

format(string, sizeof(string), "< AdmCmd > %s zabanoval hráče %s na %i dní | Duvod: %s.", GetName(playerid),GetName(id),time,reason);

SendClientMessageToAll(COLOR_LIGHTRED, string);

SetTimerEx("KickTimer1", 200, false, "i", id);

return 1;

 

 

když dam na serveru timeban tak se hráč muže hned připojit.neuloží to ban..Co mam udělat? nějakou složku ve scriptfiles?

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0

Veď ti napísal, že to neukladáš nikam. To znamená že ti to len vypíše ale neuloží záznam o tom že dostal ban. V príkaze musíš uložiť niekam najlepšie do nejakého súboru Bany/Nick.ini a pri pripojení skontroluj či súbor na jeho meno existuje. Ak áno porovnaj aktuálny čas s tým uloženým ak je uložený väčší tak ho vyhoď ak nie zmaž súbor.

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...