10.07.2011, 09:07
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?
{
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?