22.03.2015, 12:59
Hello.
I made my mute command and now i need some kind of timer which ends when mute time ends.
This is command:
I made one timer but it didn't work,and now i don't have any idea how to make timer that ends at the time.
If you need translate for this command just say it is not problem
I made my mute command and now i need some kind of timer which ends when mute time ends.
This is command:
PHP код:
CMD:mute(playerid,params[])
{
new razlog,vrijeme,ime[MAX_PLAYER_NAME],ime2[MAX_PLAYER_NAME],ID,poruka[128],poruka2[128],poruka3[128];
if(PlayerInfo[playerid][pAdministrator] < 1) return SendClientMessage(playerid, -1,"{F81414}Greska:{FFFFFF} Nemate dozvolu za tu komandu");
if(sscanf(params,"uds",ID,vrijeme,razlog)) return SendClientMessage(playerid, -1,"{FFFFFF}Koristenje:{FFF1AF} /mute (Ime/ID) (Vrijeme) (Razlog)");
if(ID == playerid) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Nemozete muteovati sami sebe");
if(PlayerInfo[ID][pAdministrator]) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Nemozete muteaovati ostale administratore");
else
{
GetPlayerName(ID,ime,sizeof(ime));
format(poruka,sizeof(poruka),"{00C0FF}WG:{FFFFFF} Muteali ste igraca{FFF1AF} %s[%d]{FFFFFF} na vrijeme od {FFF1AF}%d{FFFFFF} sekundi. Razlog: %s",ime,ID,vrijeme,razlog);
SendClientMessage(playerid,-1,poruka);
GetPlayerName(playerid,ime2,sizeof(ime2));
format(poruka2,sizeof(poruka2),"{00C0FF}WG: {FFFFFF}Muteani ste od strane{FFF1AF} %s[%d] na vrijeme od{FFF1AF} %d{FFFFFF} sekundi. Razlog: %s",ime2,playerid,vrijeme,razlog);
SendClientMessage(ID,-1,poruka2);
format(poruka3,sizeof(poruka3),"{C3C3C3}[A-Obavijest]:{FFF1AF} %s[%d]{FFFFFF} je muteovo igraca{FFF1AF} %s[%d].{FFFFFF} Razlog: %s",ime2,playerid,ime,ID,razlog);
SendAdminMessage(-1,poruka3);
{
PlayerInfo[ID][pMute] = vrijeme;
}
}
return 1;
}
If you need translate for this command just say it is not problem