30.05.2012, 11:25
i think there is no problem on the first code, but
What is Checking() for?
and why you need to loop it for all players since you're already using
it won't make the player get unmute, because you just create a new variable "Target" with no value, try changing them to playerid
also change the SetTimerEx parameter, you don't need to repeat calling the "unmute" callback
also make sure you have forwarded the unmute callback
Note: not tested, hope it works
for info, https://sampwiki.blast.hk/wiki/SetTimerEx
Quote:
pawn Код:
|
and why you need to loop it for all players since you're already using
pawn Код:
SetTimerEx("unmute", 60000, true, "i", playerid); // this will set a timer to call callback for the playerid with repeat option enabled
Quote:
pawn Код:
|
pawn Код:
public unmute(playerid)
{
if(PlayerAcc[playerid][Muted] == 1) { // check if the player is muted
PlayerAcc[Target][Muted] = 0; // set the player variable to 0 or not muted
SendClientMessage(playerid, red, "You have been unmuted! You can talk now!"); // send the message to player
}
}
pawn Код:
SetTimerEx("unmute", 60000, false, "i", playerid); // set a timer to call "unmute" for "playerid(i)" in 60000 ms = 1 minute without repeating the timer
Note: not tested, hope it works

for info, https://sampwiki.blast.hk/wiki/SetTimerEx