BAN SYSTEM FOR TIME.
#7

Oh ! Sorry ... I didn't say this: You need to create the folder Bans inside the directory scriptfiles.

Quote:
Originally Posted by budelis
Посмотреть сообщение
I fix fox ban now i can ban for hours,but one trouble.How to do that?public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(FB_tbDir,sizeof(FB_tbDir),FB_foxBanFile,pNa me);
if(FB_dini_Exists(FB_tbDir))
{
if(FB_dini_Int(FB_tbDir,"fbFB_Time")+FB_dini_Int(F B_tbDir,"fbDuration") > FB_Time())
{
new string[96];
new sekki=(FB_dini_Int(FB_tbDir,"fbFB_Time")+FB_dini_I nt(FB_tbDir,"fbDuration"))-FB_Time(),minni=sekki/60;
sekki=sekki-minni*60;
format(string,sizeof(string),"You are timebanned from this server. Remaining time: %d minutes %d seconds",minni,sekki);
SendClientMessage(playerid,0xADC7E7FF,string);
Kick(playerid);
} else { FB_dini_Remove(FB_tbDir); }
}
return CallLocalFunction("FB_OnPlayerConnect","i",playeri d);
}

There were remaining time be with hours like that: 01:59:12 is imposible to do that?
Yes, you put this in OnPlayerConnect.

Would you like to ban with minutes and seconds ?

#EDIT

Sorry again, but this must be in OnPlayerSpawn. Code fixed.

I recommend you take the code again.
Reply


Messages In This Thread
BAN SYSTEM FOR TIME. - by budelis - 09.07.2011, 20:02
Re: BAN SYSTEM FOR TIME. - by budelis - 09.07.2011, 20:40
Re: BAN SYSTEM FOR TIME. - by Shadoww5 - 10.07.2011, 04:26
Re: BAN SYSTEM FOR TIME. - by Calgon - 10.07.2011, 04:33
Re: BAN SYSTEM FOR TIME. - by budelis - 10.07.2011, 08:35
Re: BAN SYSTEM FOR TIME. - by budelis - 10.07.2011, 09:07
Re: BAN SYSTEM FOR TIME. - by Shadoww5 - 10.07.2011, 12:52
Re: BAN SYSTEM FOR TIME. - by budelis - 18.07.2011, 07:15
Re: BAN SYSTEM FOR TIME. - by MoroDan - 18.07.2011, 08:04

Forum Jump:


Users browsing this thread: 3 Guest(s)