MUTE PLAYER FOR TIME.
#8

Example code:

pawn Код:
new muted[ MAX_PLAYERS ];
CMD:mutemeforaminute( playerid, params[ ] ) {
    SetTimerEx( "unmute", 60000, 0, "i", playerid );
    muted[ playerid ] = 1;
    return SendClientMessage( playerid, -1, "You have muted yourself for a minute. " );
}

public OnPlayerText( playerid, text[ ] ) {
    if( muted[ playerid ] == 1 ) {
        SendClientMessage( playerid, -1, "Can't talk while muted! " );
        return 0;
    }
    return 1;
}

forward unmute( playerid );
public unmute( playerid ) {
    SendClientMessage( playerid, -1, "A minute has passed, you have been unmuted. " );
    muted[ playerid ] = 0;
    return 1;
}

public OnPlayerDisconnect( playerid, reason ) {  
    muted[ playerid ] = 0;
    return 1;
}
I think you can figure the rest yourself. You haven't provided any code, therefore we can't help you.
Reply


Messages In This Thread
MUTE PLAYER FOR TIME. - by budelis - 24.07.2011, 12:42
AW: MUTE PLAYER FOR TIME. - by Forbidden - 24.07.2011, 12:43
Re: MUTE PLAYER FOR TIME. - by MadeMan - 24.07.2011, 12:47
Re: MUTE PLAYER FOR TIME. - by budelis - 26.07.2011, 06:27
Re: MUTE PLAYER FOR TIME. - by budelis - 26.07.2011, 09:23
Re: MUTE PLAYER FOR TIME. - by Cjgogo - 26.07.2011, 09:24
Re: MUTE PLAYER FOR TIME. - by [MG]Dimi - 26.07.2011, 10:06
Re: MUTE PLAYER FOR TIME. - by Mean - 26.07.2011, 10:30
Re: MUTE PLAYER FOR TIME. - by budelis - 26.07.2011, 11:36
Re: MUTE PLAYER FOR TIME. - by Mean - 26.07.2011, 14:04
AW: MUTE PLAYER FOR TIME. - by Nero_3D - 26.07.2011, 14:37
Re: MUTE PLAYER FOR TIME. - by budelis - 26.07.2011, 16:37
Re: MUTE PLAYER FOR TIME. - by budelis - 28.07.2011, 07:55
Re: MUTE PLAYER FOR TIME. - by budelis - 28.07.2011, 09:36

Forum Jump:


Users browsing this thread: 2 Guest(s)