24.06.2012, 07:20
If I was creating this:
How would I create a little timer say after 1 minute of /gov not being done, govon returns to 0?
pawn Код:
CMD:gov(playerid, params[])
{
new string[128], new govon;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid) || !IsFBi || !IsLSFMD || !IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LEO/Government Official.");
if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader.");
govon == 0;
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/gov)ernment announcement [text]");
if(AntiAdv(playerid, params)) return 1;
if (govon == 0)
{
SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|");
format(string, sizeof(string), "** [%s] %s %s: %s **", RPFN(playerid), RPFRN(playerid), RPN(playerid), params);
SendClientMessageToAll(COLOR_BLUE, string);
govon == 1;
return 1;
}
else if (govon == 1)
{
format(string, sizeof(string), "** [%s] %s %s: %s **", RPFN(playerid), RPFRN(playerid), RPN(playerid), params);
SendClientMessageToAll(COLOR_BLUE, string);
return 1;
}
return 1;
}