Private chat
#4

How do you define the ID of player and ID of helper?

You should add something on the command to start chat between 2 players like:
pawn Код:
HelperChat[playerid] = 2ndplayer;
HelperChat[2ndplayer] = playerid;
You should basically send a message to playerid and HelperChat[playerid] instead of sending 2 messages to playerid.


When the chat closes you should put this:
pawn Код:
HelperChat[HelperChat[playerid]] = -1;
HelperChat[playerid] = -1;

And add this under OnPlayerDisconnect
pawn Код:
if(IsPlayerConnected(HelperChat[playerid]))
{
       SendClientMessage(HelperChat[playerid], Orange, "The player you were chatting with has disconnected.");
       HelperChat[HelperChat[playerid]] = -1;
}
HelperChat[playerid] = -1;
Reply


Messages In This Thread
Private chat - by lonako45 - 17.05.2012, 07:42
Re: Private chat - by iRage - 17.05.2012, 07:46
Re: Private chat - by lonako45 - 17.05.2012, 10:37
Re: Private chat - by iRage - 17.05.2012, 11:47
Re: Private chat - by lonako45 - 17.05.2012, 12:37

Forum Jump:


Users browsing this thread: 1 Guest(s)