Is it possible to make seperated chats in virtual worlds ?
#1

Hello
[*] I want to know if its possible to make seperated chats in different worlds.

For example, Stunting world has its own chat and Roleplay world has its on chat ( virtual worlds )
Any help / tip would be helpful.
Reply
#2

You can do it manually.Returning 0 on OnPlayerText will not send the message.

First Get the virtual world of the player.Then a for loop(or foreach) to loop through all the player with the same virtual world and SendClientMessage to them.At the end return 0.

Код:
public OnPlayerText(playerid,text[])
{
     new msg[128];
      new vw = GetPlayerVirtualWorld(playerid);
      format(msg,sizeof(msg),"%s:%s",playername,text);
      for(new i = 0;i < maxplayers;i++)
      {
            if(GetPlayerVirtualWorld(i) == vw)
                SendClientMessage(i,color,msg);
        }
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)