10.07.2011, 12:52
(
Последний раз редактировалось Shadoww5; 10.07.2011 в 15:00.
)
Oh ! Sorry ... I didn't say this: You need to create the folder Bans inside the directory scriptfiles.
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.
Quote:
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? |
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.