Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Disable all chat search and destroy gametype

Featured Replies

Опубликовано:
Allow chatting only with team, try this command

cg_teamchatsonly 1

 

Yep that works. But i guess it's a client dvar so he will have to force it through a .gsc file.

 

Something like this in one of the stock .gsc files:

 

-code-

 

Not sure if the clientdvar resetting on disconnect works properly. You would have to try.

Опубликовано:
  • Автор
Allow chatting only with team, try this command

cg_teamchatsonly 1

 

Yep that works. But i guess it's a client dvar so he will have to force it through a .gsc file.

 

Something like this in one of the stock .gsc files:

 

onPlayerConnect()
{
for(;
{
	level waittill( "connected", player );

	player noGlobalChat();
	player thread onDisconnect();
}
}

noGlobalChat()
{
self setClientDvar("cg_teamChatsOnly", 1);
}

onDisconnect()
{
level endon ( "game_ended" );

self waittill ( "disconnect" );
self setClientDvar("cg_teamChatsOnly", 0);
}

 

The player could change it if he knows the dvar though.

 

Well, to force it every 1.5 sec or so, you could do something like this:

onPlayerConnect()
{
for(;
{
	level waittill( "connected", player );

	player thread noGlobalChat();
	player thread onDisconnect();
}
}

noGlobalChat()
{
self endon("disconnect");

for(; {
	self setClientDvar("cg_teamChatsOnly", 1);
	wait 1.5;
}
}

onDisconnect()
{
level endon ( "game_ended" );

self waittill ( "disconnect" );
self setClientDvar("cg_teamChatsOnly", 0);
}

 

Not sure if the clientdvar resetting on disconnect works properly. You would have to try.

 

can you put this dvar in gsc file ?

Опубликовано:

can you put this dvar in gsc file ?

 

Yes, but please try to set it in server.cfg before:

 

set cg_teamChatsOnly "1"

 

If you press T and write something it won't show up at all. (in case it's working through server dvar, i guess it won't)

 

Let me know when you tried.

Опубликовано:
  • Автор

can you put this dvar in gsc file ?

 

Yes, but please try to set it in server.cfg before:

 

set cg_teamChatsOnly "1"

 

If you press T and write something it won't show up at all. (in case it's working through server dvar, i guess it won't)

 

Let me know when you tried.

 

later i am gonna away for a few hours... I will also ask a friend to enter the server and test

 

Maybe dvars works better because when the round Search&Destroy ends i think i still put the command again, i try this later bye.

 

tks banz

 

please upload the gsc file in here

Опубликовано:
  • Автор
Save this as _playerlogic.gsc :

 

http://pastebin.com/hrSMgAiD

 

Try if the dvar gets correctly reset to 0 when you disconnect...

 

doesn't reset to 0 when i disconnect i connect to other server and problem remains this dvar save in config in players i have to delete and open again the game to working

Опубликовано:
  • Автор
Try this instead. Save as _rank.gsc .

http://pastebin.com/QZpp4vrU

 

Pretty sure it won't work either though...

i cant now because i am in war IW4 :P at now tomorrow i test it

 

doesn't work...

 

when i enter the server first its ok chat invisible but when i join other server the chat remains invisible

 

anything that can fix this?

Опубликовано:

doesn't work...

 

when i enter the server first its ok chat invisible but when i join other server the chat remains invisible

 

anything that can fix this?

 

Can't think of a fix that just uses .gsc files...

Опубликовано:
  • Автор

forget it... because in the end i will tell all people to use cg_teamchatonly 0

 

I want to know when placing this command in my server is impossible to put teamchatonly 0 and the teamchatonly continues until when disconnect and connect other server people can put cg_teamchatonly 0, but in my server impossible to put ...

 

banz can you put a script to force the command cg_teamchatonly 1 every time?

Опубликовано:
onPlayerConnect()
{
for(;
{
	level waittill( "connected", player );

	player thread noGlobalChat();
	player thread onDisconnect();
}
}

noGlobalChat()
{
self endon("disconnect");

for(; {
	self setClientDvar("cg_teamChatsOnly", 1);
	wait 1.5;
}
}

onDisconnect()
{
level endon ( "game_ended" );

self waittill ( "disconnect" );
self setClientDvar("cg_teamChatsOnly", 0);
}

OP is portuguese and he asked me some help in trying to get this running.

Well, I'm a nab with gsc, but I know you can help him, so I tried to put your code on a gsc. Happens that the server hangs on startup with this message:

 

[     11705] Could not find menu 'main'
[     11705] Calling Party_StopParty() for partyId 0
[     11705] Not uploading stats: no statWriteNeeded (cont 0)
[     11705] Clearing migration data
[     11705] Clearing migration data
[     11705] Calling Party_StopParty() for partyId 1
[     11705] Clearing migration data
[     11705] Clearing migration data

m2demo\nochat.iwd\maps\mp\gametypes\_rank.gsc

No other scripts running.

Опубликовано:
to code on this phone...

lol

Do you have to keep coding everywhere you go? :P

 

Nope. I am at home now. Save this as _rank.gsc :

 

-snippet-

 

And what about this:

m2demo\nochat.iwd\maps\mp\gametypes\_rank.gsc

 

that .iwd file shouldn't be there. Just copy the _rank.gsc in m2demo\maps\mp\gametypes

Опубликовано:

Working flawlessly now ;)

As for the .iwd, there are 2 reasons why I tell people to use .iwd files.

One is for them to easily manage their scripts as soon as they open m2demo folder (they see all their scripts right away, each on it's identified .iwd)

The second is to avoid them losing the script the next time that they run the updater (_rank.gsc will get replaced by the updater, since the hash no longer matches)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.