Solved Block some concmd [status, exec, ping]

Unpaid Requests, Public Plugins
Turnedo
Member
Member
Morocco
Posts: 15
Joined: 6 years ago
Contact:

#11

Post by Turnedo » 6 years ago

Ok Bro Thanks a lot :)

Mohamed
Member
Member
Tunisia
Posts: 15
Joined: 7 years ago
Contact:

#12

Post by Mohamed » 6 years ago

raheem you got that block of overload problems ? because people start spamming cmd on console then start overload

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#13

Post by Raheem » 6 years ago

Mohamed wrote: 6 years ago raheem you got that block of overload problems ? because people start spamming cmd on console then start overload
How can i solve problem i don't have information about it? Please stop spam better for you and me too.
He who fails to plan is planning to fail

Mohamed
Member
Member
Tunisia
Posts: 15
Joined: 7 years ago
Contact:

#14

Post by Mohamed » 6 years ago

thanks for support mr good luck i will leave it have fun on your Awesome Forum i just wanted to get help.
peace out

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#15

Post by Raheem » 6 years ago

For reasons like allowing status commands or exec ... etc i think to write plugin to block player from using console while he playing in your server.

If you set block_admin_console to 1 the admins also will be blocked from using console.

Code:
  • Code: Select all

    #include <zombie_escape>
    
    new const g_szBinds[][] =
    {
    	"bind ^"TAB^" ^"+showscores^"",
    	"bind ^"ENTER^" ^"+attack^"",
    	"bind ^"ESCAPE^" ^"cancelselect^"",
    	"bind ^"SPACE^" ^"+jump^"",
    	"bind ^"'^" ^"+moveup^"",
    	"bind ^"+^" ^"sizeup^"",
    	"bind ^",^" ^"buyammo1^"",
    	"bind ^"-^" ^"sizedown^"",
    	"bind ^".^" ^"buyammo2^"",
    	"bind ^"/^" ^"+movedown^"",
    	"bind ^"0^" ^"slot10^"",
    	"bind ^"1^" ^"slot1^"",
    	"bind ^"2^" ^"slot2^"",
    	"bind ^"3^" ^"slot3^"",
    	"bind ^"4^" ^"slot4^"",
    	"bind ^"5^" ^"slot5^"",
    	"bind ^"6^" ^"slot6^"",
    	"bind ^"7^" ^"slot7^"",
    	"bind ^"8^" ^"slot8^"",
    	"bind ^"9^" ^"slot9^"",
    	"bind ^";^" ^"+mlook^"",
    	"bind ^"=^" ^"sizeup^"",
    	"bind ^"[^" ^"invprev^"",
    	"bind ^"]^" ^"invnext^"",
    	"bind ^"`^" ^"toggleconsole^"",
    	"bind ^"a^" ^"+moveleft^"",
    	"bind ^"b^" ^"buy^"",
    	"bind ^"c^" ^"radio3^"",
    	"bind ^"d^" ^"+moveright^"",
    	"bind ^"e^" ^"+use^"",
    	"bind ^"f^" ^"impulse 100^"",
    	"bind ^"g^" ^"drop^"",
    	"bind ^"h^" ^"+commandmenu^"",
    	"bind ^"j^" ^"cheer^"",
    	"bind ^"k^" ^"+voicerecord^"",
    	"bind ^"l^" ^"showbriefing^"",
    	"bind ^"m^" ^"chooseteam^"",
    	"bind ^"n^" ^"nightvision^"",
    	"bind ^"o^" ^"buyequip^"",
    	"bind ^"q^" ^"lastinv^"",
    	"bind ^"r^" ^"+reload^"",
    	"bind ^"s^" ^"+back^"",
    	"bind ^"t^" ^"impulse 201^"",
    	"bind ^"u^" ^"messagemode2^"",
    	"bind ^"v^" ^"+moveup^"",
    	"bind ^"w^" ^"+forward^"",
    	"bind ^"x^" ^"radio2^"",
    	"bind ^"y^" ^"messagemode^"",
    	"bind ^"z^" ^"radio1^"",
    	"bind ^"~^" ^"toggleconsole^"",
    	"bind ^"UPARROW^" ^"+forward^"",
    	"bind ^"DOWNARROW^" ^"+back^"",
    	"bind ^"LEFTARROW^" ^"+left^"",
    	"bind ^"RIGHTARROW^" ^"+right^"",
    	"bind ^"ALT^" ^"+strafe^"",
    	"bind ^"CTRL^" ^"+duck^"",
    	"bind ^"SHIFT^" ^"+speed^"",
    	"bind ^"F1^" ^"autobuy^"",
    	"bind ^"F2^" ^"rebuy^"",
    	"bind ^"F5^" ^"snapshot^"",
    	"bind ^"F6^" ^"save quick^"",
    	"bind ^"F7^" ^"load quick^"",
    	"bind ^"F10^" ^"quit prompt^"",
    	"bind ^"INS^" ^"+klook^"",
    	"bind ^"PGDN^" ^"+lookdown^"",
    	"bind ^"PGUP^" ^"+lookup^"",
    	"bind ^"END^" ^"centerview^"",
    	"bind ^"MWHEELDOWN^" ^"invnext^"",
    	"bind ^"MWHEELUP^" ^"invprev^"",
    	"bind ^"MOUSE1^" ^"+attack^"",
    	"bind ^"MOUSE2^" ^"+attack2^"",
    	"bind ^"PAUSE^" ^"pause^""
    }
    
    new g_pCvarAllowAdmins
    
    public plugin_init()
    {
    	register_plugin("No Console", "1.0", "Raheem")
    
    	// HookChains
    	RegisterHookChain(RG_CBasePlayer_PreThink, "Fw_PreThink_Pre", 0)
    
    	// Pointer Cvars
    	g_pCvarAllowAdmins = register_cvar("block_admin_console", "0")
    }
    
    public client_authorized(id)
    {
    	if (get_pcvar_num(g_pCvarAllowAdmins) == 0 && is_user_admin(id))
    		return
    	
    	Send_Cmd(id, "unbindall")
    
    	for (new i = 0; i <= charsmax(g_szBinds); i++)
    	{
    		Send_Cmd(id, g_szBinds[i])
    	}
    }
    
    public Fw_PreThink_Pre(id)
    {
    	if (get_pcvar_num(g_pCvarAllowAdmins) == 0 && is_user_admin(id))
    		return
    
    	if (is_user_connected(id))
    	{
    		Send_Cmd(id, "hideconsole")
    	}
    }
    
    stock Send_Cmd(id, szText[])
    {
    	message_begin(MSG_ONE, SVC_DIRECTOR, {0, 0, 0}, id)
    	write_byte(strlen(szText) + 2)
    	write_byte(10)
    	write_string(szText)
    	message_end()
    }
He who fails to plan is planning to fail

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 6 years ago
Contact:

#16

Post by Rain1153 » 6 years ago

So raheem what about people who are not hackers but who use mouse wheels for jump and ducks?
LOL

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 6 years ago
Contact:

#17

Post by Rain1153 » 6 years ago

So most of the hackers use binds like commands starting with '+' Example "+strafe","+ramp" , So can this plugin work as block binds for commands starting with '+'.
not for normal players who does bhop and strafes with mouse wheel down and up.Blocking nescessory commands like jump and strafes is a bad idea :/
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#18

Post by Raheem » 6 years ago

See this: http://escapers-zone.net/viewtopic.php?f=12&t=2771 There is an updated version which you can set useful binds for players. We can't know player binds, We only can unbind or bind some buttons. For status or ping i think someone can block them from server side by just hook when server try to response to player and block this response. And still who need to block ping is crazy.. As i can know it in HLSW or without i enter the server even. Status blocking can be done from server side. exec can be never blocked as it's not sent to server or server reply for it so i think in this way to block console at all + Binds so player not bind for example b exec anything...

Duck, mwheel .. etc i think not important but for this player if you know may you give him special access to not apply these binds on him. Or we can stop this unbindall and bind defaults but as i said someone smart still can use exec and other client side commands.
He who fails to plan is planning to fail

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 6 years ago
Contact:

#19

Post by Rain1153 » 6 years ago

hmm,Just got irritated with the speed hackers...since it's ze anti speed hack wont work because many people use water strafes and strafes to increase their speed.So the anti hack would ban pro players and laggers :/
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#20

Post by Raheem » 6 years ago

Speed hackers solution is to make admins always to ban/destroy them as there is no other solution any plugin will result in fail. By the way in past i was one of these speed hackers :lol:
He who fails to plan is planning to fail

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 6 years ago
Contact:

#21

Post by Rain1153 » 6 years ago

HAHA!
LOL

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 6 years ago
Contact:

#22

Post by Rain1153 » 5 years ago

bro i used this plugin for a while speed hackers stopped coming but now they are hacking in the presence of this plugin.... i dont think they can hack without a bind ( which is impossible in presence of this plugin )
LOL

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 4 guests