usually the SendClientMessageToAll() gets used for sending a chat to all players. what you need, is an array holding all players, with a value to allow the chat output:
Code:
new AllowChat[MAX_PLAYERS];
then, instead of SendClientMessageToAll(), make a loop, checking if the AllowChat[playerid]==1 - if set to 0 (when logging in, ergo not set to 1 before spawning), then dont send the chat line. this will require a bit processing time due to the loop:
Code:
public OnPlayerText(playerid, text[]){
//SendClientMessageToAll(0xffffffff,text); //disabled this, and replaced by the following loop:
new MaxPlayers=GetMaxPlayers();
for(new id=0;id<MaxPlayers;id++)
{
if(AllowChat[id]==1)// dont forget to set this to 1 when spawning!
{
SendClientMessage(id,0xffffffff,text);
}
return 1;
}
suppress chat on skin selection (i would use the OnPlayerConnect here aswell)
Code:
OnPlayerRequestClass(playerid, classid){
//...
AllowChat[playerid]=0;
//...
}
to allow the chat after spawn:
Code:
OnPlayerSpawn(playerid, classid){
//...
AllowChat[playerid]=1;
//...
}
not tested, its the concept idea only, but i hope you get how simple it works ^^