Muting help
#1

Hey i made this code
pawn Код:
forward unmute2(playerid);
public unmute2(playerid)
{
    GetPlayerName(playerid, name2, sizeof(name2));
    Muted[playerid] = 1;
    format(string5, sizeof(string5), "ET Bot: %s has been muted for swearing for 1 minute", name2);
    SendClientMessageToAll(playerid, string5);
    SetTimer("unmute", 1000*60, false);
}
new string25[700];
forward unmute(playerid);
public unmute(playerid)
{
    Muted[playerid] = 0;
    format(string25, sizeof(string25), "ET Bot: %s has been unmuted", name2);
    SendClientMessageToAll(playerid, string25);
    IsPlayerMuted[playerid] = 0;

}
But it only mutes ID 0 and not the guy who sweared how to fix ? :S
Reply
#2

Use SetTimerEx insteed
Reply
#3

Example ? i never used SetTimerEx.
Reply
#4

pawn Код:
SetTimerEx("unmute", 1000*60, false, "i", playerid);//this just means you are calling a function on a timer that takes "playerid" as a parameter.
https://sampwiki.blast.hk/wiki/SetTimerEx
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)