30.05.2012, 11:39
I copyed the wrong forward it should be
I thought if I set a timer after the bot muted a player he should call the unmute public after the timer was passed (1 minute) and then it should unmute a player so I looped through all the players to check who is muted and then unmute that target but it should be the playerid, So if I take this
and then with the false timer, I thought it should repeat becouse the player can swear the next time without calling it back but thats bullshit then..
so then it should work in theorie?
pawn Код:
forward unmute(playerid);//above in the script
public unmute(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && PlayerAcc[i][Muted] == 1)
PlayerAcc[i][Muted] = 0;
SendClientMessage(playerid ,red,"You have been unmuted by Chuck! You can talk now!");
}
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
}
}
so then it should work in theorie?