SetTimerEx left time problem.
#2

pawn Код:
CMD:mute(playerid, params[])
{
new string[128];
new pname[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
if(sscanf(params, "ui",muteID, mutlaikas)) return SendClientMessage(playerid, PILKA, "Teisingas Naudojimas: /mute [ZaidejoVardas/ID] [Laikas] !");
if(!IsPlayerConnected(muteID)) return SendClientMessage(playerid, PILKA, "Zaidejas Neegzistuoja !");
if(Stats[muteID][mute] == 1) return SendClientMessage(playerid,PILKA, "Asmuo Jau Yra Uztildytas");
mutetimer[muteID] = SetTimerEx("BMute", mutlaikas[muteID]*1000, false, "i", muteID);
GetPlayerName(muteID, name, sizeof(name));
GetPlayerName(playerid, pname, sizeof(pname));
new time = mutlaikas[playerid]*1000;
format(string, sizeof(string), "Just Uztildete Zaideja %s %i Sekundziu !", name, time);
SendClientMessage(playerid, PILKA, string);
format(string, sizeof(string), "Jus Buvote Uztilditas Administratorio %s %i Sekundziu !", pname, time);
SendClientMessage(muteID, PILKA, string);
Stats[muteID][mute] = 1;
return 1;
}
and i made this
public OnPlayerText(playerid, text[])
{
if(Stats[playerid][mute] == 1)
{
new string[200];
format(string, sizeof(string), "Jums Liko Dar %i Sekundziu Uztildimo!", mutetimer[playerid]);
SendClientMessage(playerid, 0xFFFFFFFFF, string);
return 0;
}
return 1;
}
Replace ur cmd with this
Reply


Messages In This Thread
SetTimerEx left time problem. - by karolis11234 - 23.03.2014, 12:58
Re: SetTimerEx left time problem. - by Hanuman - 23.03.2014, 13:36
Re: SetTimerEx left time problem. - by Konstantinos - 23.03.2014, 13:42
Re: SetTimerEx left time problem. - by karolis11234 - 23.03.2014, 13:51
Re: SetTimerEx left time problem. - by MP2 - 23.03.2014, 15:32

Forum Jump:


Users browsing this thread: 1 Guest(s)