15.03.2014, 17:32
so i tried to create a /mute command that would work like /mute [playerid] [time] but i failed
can anyone help ?
the lines are:
CMD:mute(playerid, params[])
{
new string[128];
new pname[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
if(sscanf(params, "ui",muteID, mutelaikas)) return SendClientMessage(playerid, 0xFFFFFFFFF, "Teisingas Naudojimas: /mute [ZaidejoVardas/ID] [Laikas] !");
if(!IsPlayerConnected(muteID)) return SendClientMessage(playerid, 0xFFFFFFFFF, "Zaidejas Neegzistuoja !");
SetTimerEx("BMute", mutelaikas[muteID], false, "i", playerid);
GetPlayerName(muteID, name, sizeof(name));
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "Just Uzmutinote Zaideja %s %i Sekundziu !", name, mutelaikas[playerid]);
SendClientMessage(playerid, 0xFFFFFFFFF, string);
format(string, sizeof(string), "Jus Buvote Uzmutintas Administratorio %s %i Sekundziu !", pname, mutelaikas[playerid]);
SendClientMessage(muteID, 0xFFFFFFFFF, string);
Stats[muteID][mute] = 1;
mutelaikas[muteID] = mutelaikas[muteID];
return 1;
}
and
public BMute(playerid)
{
Stats[muteID][mute] = 0;
return 1;
}
i forwarded it but i cant see whats wrong with the code , can anyone help me with this problem ?
can anyone help ?
the lines are:
CMD:mute(playerid, params[])
{
new string[128];
new pname[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
if(sscanf(params, "ui",muteID, mutelaikas)) return SendClientMessage(playerid, 0xFFFFFFFFF, "Teisingas Naudojimas: /mute [ZaidejoVardas/ID] [Laikas] !");
if(!IsPlayerConnected(muteID)) return SendClientMessage(playerid, 0xFFFFFFFFF, "Zaidejas Neegzistuoja !");
SetTimerEx("BMute", mutelaikas[muteID], false, "i", playerid);
GetPlayerName(muteID, name, sizeof(name));
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "Just Uzmutinote Zaideja %s %i Sekundziu !", name, mutelaikas[playerid]);
SendClientMessage(playerid, 0xFFFFFFFFF, string);
format(string, sizeof(string), "Jus Buvote Uzmutintas Administratorio %s %i Sekundziu !", pname, mutelaikas[playerid]);
SendClientMessage(muteID, 0xFFFFFFFFF, string);
Stats[muteID][mute] = 1;
mutelaikas[muteID] = mutelaikas[muteID];
return 1;
}
and
public BMute(playerid)
{
Stats[muteID][mute] = 0;
return 1;
}
i forwarded it but i cant see whats wrong with the code , can anyone help me with this problem ?