darkerz7 / CSGO-Plugins

My Plugins
46 stars 35 forks source link

Hide plugin changes #19

Closed asphyxious closed 4 years ago

asphyxious commented 4 years ago

Hey, I've been using a different hide plugin, but it's got a few small issues as well, so I wanted to use yours. But needed the following changes if possible

  1. Add a default cvar for when players use !hide without adding any number, it can set hide to that value.

  2. Also, if im not wrong, using sm_hide again after you have already hidden players does not unhide players, you have to sm_unhide, needed that changed as well

  3. I use a leader plugin by antiteal, could you make it so the leader doesn't get hidden when player uses !hide https://forums.alliedmods.net/showthread.php?p=2559021

  4. Haven't tested but !hideall command should hide item users and leader [sometimes item users block vision during lasers and such]

darkerz7 commented 4 years ago

a command sm_hide with no arguments shows a menu. to switch modes use another command sm_hideall. my plugin only hides players. sometimes there are custom skins on the maps, so their plugin can no longer hide it. so the server load is growing tremendously due to SDKHook_SetTransmit, better use plugin PlayerVisibility

darkerz7 commented 4 years ago

Added version with leader adaptation(Not Tested)

asphyxious commented 4 years ago

I use this one currently

https://github.com/KoreanDude/csgo-ze-plugins/blob/master/ZR%20Hide%20Teammates/hide_teammates.sp

It doesn't cause any lag on server, and sm_hide hides everything but item users. Just that it doesn't have hideall, and leader adaptation. Maybe you can implement a hide system similar to that [where sm_hide toggles hide on players except item users]

And does HIDEALL hide everything including item users?

darkerz7 commented 4 years ago

that sm_hide, that sm_hideall perform the same functions. Сommand sm_hideall created for easy binding.In addition, the principle of action is that of my plugin, that the plugin from KoreanDude is the same. the only other interface in my plugin is implemented and it is more optimized

asphyxious commented 4 years ago

Is there an option to hide ALL players including item user? I really wanted to add an option for that, players really wanted it as some player dont like to see item user during laser

darkerz7 commented 4 years ago

this will create an unnecessary load on the server, as it will be necessary to hook not only the player himself, but also the entities attached to the player. and each entity check also multiplies by the number of players

darkerz7 commented 4 years ago

it is impractical

asphyxious commented 4 years ago

Can you add a cvar to disable menu? My players use a bind sm_hide , and the menu is a bit annoying because they have to open menu and use through that.

asphyxious commented 4 years ago

Nevermind, I recompiled and changed name of the commands.

But there is one bug [exists in koreandudes as well]

If you have hide on and you go spectate, it will be bugged. If you are zombie and you hide teammates, and go spectate, you can spectate humans but zombies will be hidden, and if you spectate zombies you will see a stuck image of the players first person at the location you were last at.

Is there a way to fix it?

darkerz7 commented 4 years ago

Maybe you get into the spectators incorrectly. Somehow the server thinks the player is still alive and playing for one of the teams

darkerz7 commented 4 years ago

g_HidePlayers[client][target] = false; if(IsClientInGame(client) && IsPlayerAlive(client)) { if(target != client && g_bHide[client] && IsClientInGame(target) && IsPlayerAlive(target)) { if((GetClientTeam(client)==GetClientTeam(target))) { if((GetClientTeam(client)==2)||(GetClientTeam(client)==3))

This part of the code is responsible for checking two players for belonging to one team. When using M, everything works fine.

asphyxious commented 4 years ago

Ah okay , yea i was using spectate plugin with which players use !spec

I will check

asphyxious commented 4 years ago

Ok , there's a new issue, i'm not a 100 % sure its this, but it only started happening recently after adding this plugin. On random round starts, all player fps's will drop to 15 / 20 fps. Could this plugin be causing that by any chance?

darkerz7 commented 4 years ago

It’s unlikely, in the latest version I added only one check for a leader and that’s it. I met a similar problem, the plugin for Molotov cocktail was to blame there image

asphyxious commented 4 years ago

It's only started after this plugin was added though. And only a rejoin seems to fix the fps , till then it keeps them at low fps.

asphyxious commented 4 years ago

What plugin for molotov was lagging for you? Was it the one that changes molotov particles for more fps?

darkerz7 commented 4 years ago

I don’t know exactly what kind of plugin, I heard that in a random round on some cards people’s FPS drops, on the whole server. while the molotov burns, the FPS is restored, and then it falls again

darkerz7 commented 4 years ago

As soon as the plugin and the molotovs themselves removed everything became normal