PHP код:
CMD:tempban(playerid,params[])
{
if(pInfo[playerid][pLevel] >= 2)
{
new id, reason[50], Jfile[100];
new year,month,day,hour,minuite,second,Hours,BanTime,d,h,m,Temp;
if(sscanf(params, "uis[50]", id, Hours, reason)) return SCM(playerid, yellow, "SERVER : /tempban <Player ID> <Hours> <Reason>");
if(IsPlayerConnected(id) )
{
// if(pInfo[playerid][pLevel] <= pInfo[id][pLevel]) return ShowMessage(playerid, red, 6);
getdate(year, month, day);
gettime(hour,minuite,second);
BanTime = gettime() + (Hours*3600);
if(pInfo[id][Logged] == 1)
{
format(Jfile, 100, ACCOUNTS_PATH, GetName(id));
new INI:ACCOUNT = INI_Open(Jfile);
INI_WriteInt(ACCOUNT, "TempBan", BanTime);
INI_Close(ACCOUNT);
}
Temp = BanTime - gettime();
format(Jstring,sizeof(Jstring),"%s has been Temporarily Banned by Administrator %s for %s | Reason: %s <Date: %d/%d/%d> <Time: %d:%d>",GetName(id),GetName(playerid),ConvertTime(Temp,m,h,d),reason,day,month,year,hour,minuite);
SCMToAll(red,Jstring);
Temp = BanTime - gettime();
format(JLstring,sizeof(JLstring),"{37C8C8}Administrator %s has Temp banned you for %s REASON |: \"%s\"\n\nVisit "WEBSITE" for more informations", GetName(playerid),ConvertTime(Temp,m,h,d),reason);
ShowPlayerDialog(id,JDIALOGS+200,DIALOG_STYLE_MSGBOX,"{FF0000}You are BANNED",JLstring,"OK","");
format(Jstring,sizeof(Jstring),"[TEMP BAN] %s has Temp banned %s for %s | reason: ",GetName(playerid),GetName(id),ConvertTime(BanTime,m,h,d),reason);
WriteToLog(Jstring,"Bans");
CommandToAdmins(playerid,"tempban");
return SetTimerEx("KickPlayer",100,false,"d", id);
}
else return ShowMessage(playerid, red, 3);
}
else return ShowMessage(playerid, red, 1);
}
Yeah it is in Script file Folder well all other saving system working fine only this cmd crash server.
Im not sure wether this causes it but remove it and replace with a seperated line like