30.05.2015, 10:09
I want two server commands to happen on their own after every 7 minutes. So the two commands which I want to happen after every 7 mins server running are. /clearbox and /clearallchat.
this is the clearbox CMD.
This is the clearallchat cmd.
So I want server to use each of these CMD on itself after 7 mins. So can someone tell me the codes I have to put in my script in order to do this ?
this is the clearbox CMD.
pawn Код:
CMD:clearbox(playerid)
{
if(PlayerInfo[playerid][Level] >= 5)
{
for(new line; line<15; line++)
{
format(MsgBoxStr[line], 128, "-");
}
TextDrawShowForAll(MessageBox[1]);
TextDrawShowForAll(MessageBox[2]);
TextDrawShowForAll(MessageBox[3]);
TextDrawShowForAll(MessageBox[4]);
TextDrawShowForAll(MessageBox[5]);
TextDrawShowForAll(MessageBox[6]);
TextDrawShowForAll(MessageBox[7]);
TextDrawShowForAll(MessageBox[8]);
TextDrawShowForAll(MessageBox[9]);
TextDrawShowForAll(MessageBox[10]);
TextDrawShowForAll(MessageBox[11]);
new string[128];
format(string,sizeof(string),MsgBoxStr[1]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[2]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[3]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[4]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[5]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[6]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[7]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[8]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[9]);
SendBoxMsg(playerid,string);
format(string,sizeof(string),MsgBoxStr[10]);
SendBoxMsg(playerid,string);
} else return SP COLOR_RED,"Only Level +5 Admins can use this command");
return 1;
}
pawn Код:
CMD:clearallchat(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 1) {
CMDMessageToAdmins(playerid,"CLEARALLCHAT");
for(new i = 0; i < 50; i++) SendClientMessageToAll(green," "); return 1;
} else return SendClientMessage(playerid,red,"ERROR: You need to be level 1 to use this command");
}