Cant get the Timer working, Plz help -.-
#3

I copyed the wrong forward it should be
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!");
}
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

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
    }
}
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?
Reply


Messages In This Thread
Cant get the Timer working, Plz help -.- - by jordy.kiesebrink - 30.05.2012, 10:50
Re: Cant get the Timer working, Plz help -.- - by RoboN1X - 30.05.2012, 11:25
Re: Cant get the Timer working, Plz help -.- - by jordy.kiesebrink - 30.05.2012, 11:39

Forum Jump:


Users browsing this thread: 1 Guest(s)