How to target everyuser in the game?
#4

pawn Код:
new allownoobmessages[MAX_PLAYERS]

//OnPlayerConnect
allownoobmessages[playerid] = 1;

CMD:allownoobmessage( playerid, params[] )
// bracket goes here, sorry i dont have it in my keyboard
     if( allownoobmessages[playerid] == 1 )
         allownoobmessages[playerid] = 0;
     else
          allownoobmessages[playerid] = 1;
     return 1;
// closing bracket


stock SendNoobMessage( color, string[] )
// bracket
    for( new i = 0; i!=MAX_PLAYERS;i++ )
        if( allownoobmessages[i] == 1 && IsPlayerConnected( playerid ) )
            SendClientMessage( playerid, color, string );
     return 1;
// closing bracket
Sorry for identation and all, i dont have PAWNO in this computer, either can do brackets.

Note you need to reset the variable when a player disconnects, this is just a snippet, you can do the noob chat command yourself with it.
Reply


Messages In This Thread
How to target everyuser in the game? - by NewerthRoleplay - 03.05.2012, 18:20
Re: How to target everyuser in the game? - by antonio112 - 03.05.2012, 18:22
Re: How to target everyuser in the game? - by Mauzen - 03.05.2012, 18:24
Re: How to target everyuser in the game? - by Marricio - 03.05.2012, 18:26
Re: How to target everyuser in the game? - by Mauzen - 05.05.2012, 07:41
Re: How to target everyuser in the game? - by NewerthRoleplay - 07.05.2012, 11:22

Forum Jump:


Users browsing this thread: 1 Guest(s)