Raised This Month: $ Target: $400
 0% 

Delete topic.


Post New Thread Reply   
 
Thread Tools Display Modes
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 09-03-2009 , 00:12   Re: [REQ] Exec Block ?
Reply With Quote #11

hmm try this and tell me if it works

sv_blockmode is a cvar it uses if you dont understand that dont worry about it because its not important. But put that in server.cfg and either to sv_blockmode 0 or sv_blockmode 1. 0 Will disconnect a user and 1 will Kick the user, it defaults to 1 so that users can know why they were dropped.

Code:
#include <amxmodx>
#include <amxmisc>

new pMode		//Pointer for the two settings of kick or disconnect

public plugin_init()
{
	register_plugin("Block Exec", "1.0", "Silenttt aka Michael 'S.A' Knight")
	
	pMode = register_cvar("sv_blockmode", "1")	//1-Kick, 0-Disconnect
}

public client_command(id)
{
	new pCommand[33]
	read_argv(0, pCommand, 32)
	
	if( containi(pCommand, "exec") != -1 )
	{
		if(get_pcvar_num(pMode) == 1)
		{
			new pName[33]
			get_user_name(id, pName, 32)
			server_cmd("kick %s Executing of scripts is not allowed!",pName)
			return PLUGIN_HANDLED
		}
		else
		{
			console_cmd(id, "disconnect")
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_HANDLED
}
Attached Files
File Type: sma Get Plugin or Get Source (BlockExec.sma - 491 views - 884 Bytes)

Last edited by silentt; 09-03-2009 at 00:15. Reason: Added code for others to see
silentt is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-03-2009 , 01:04   Re: [REQ] Exec Block ?
Reply With Quote #12

As was said once before "exec" is not sent to the server. It won't work.
__________________
fysiks is offline
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 09-03-2009 , 02:34   Re: [REQ] Exec Block ?
Reply With Quote #13

oh mb didnt catch why
silentt is offline
pirvu
Senior Member
Join Date: Apr 2009
Location: Here and There [ro]
Old 09-03-2009 , 03:34   Re: [REQ] Exec Block ?
Reply With Quote #14

Quote:
Originally Posted by fysiks View Post
As was said once before "exec" is not sent to the server. It won't work.
I said that 3 times in this thread and i suggested to lock it cuz it will get bumped and we won't solve anything ...
__________________
Http://pirvu.mybrute.com <- Try my BRUTE! If you dare!
pirvu is offline
Send a message via Yahoo to pirvu Send a message via Skype™ to pirvu
Old 09-03-2009, 04:36
bblair
This message has been deleted by bblair.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-03-2009 , 17:19   Re: [REQ] Exec Block ?
Reply With Quote #15

Quote:
Originally Posted by pirvu View Post
I said that 3 times in this thread and i suggested to lock it cuz it will get bumped and we won't solve anything ...
Sometimes people just don't get it. I said it was said before already .
__________________
fysiks is offline
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 09-03-2009 , 23:55   Re: [REQ] Exec Block ?
Reply With Quote #16

Quote:
Originally Posted by pirvu View Post
I said that 3 times in this thread and i suggested to lock it cuz it will get bumped and we won't solve anything ...
You said it but you didnt say why. You said it might work if you did it as a clcmd and then you said no that wouldnt work and then put up code. You werent clear enough as to why it wouldnt work. fysiks made it clear by saying its a command that isnt sent to the server

Quote:
Originally Posted by fysiks View Post
Sometimes people just don't get it. I said it was said before already .
bblair doesnt speak english he doesnt understand any of whats being said
silentt is offline
pirvu
Senior Member
Join Date: Apr 2009
Location: Here and There [ro]
Old 09-04-2009 , 03:54   Re: [REQ] Exec Block ?
Reply With Quote #17

@silentt You're kidding ?

2. You cannot see if a player uses the Exec command that is client side ...

But as i sayd it's impossible to see if he used exec !

But it doens't work cuz the exec command is client side :-h ..
So close this thread cuz it will get bumped like crap :-?

It's the same as fysiks sayd ..

As was said once before "exec" is not sent to the server. It won't work.

Client Side means Not sent to server FFS ...
__________________
Http://pirvu.mybrute.com <- Try my BRUTE! If you dare!
pirvu is offline
Send a message via Yahoo to pirvu Send a message via Skype™ to pirvu
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-04-2009 , 04:02   Re: [REQ] Exec Block ?
Reply With Quote #18

Quote:
Originally Posted by pirvu View Post
@silentt You're kidding ?

2. You cannot see if a player uses the Exec command that is client side ...

But as i sayd it's impossible to see if he used exec !

But it doens't work cuz the exec command is client side :-h ..
So close this thread cuz it will get bumped like crap :-?

It's the same as fysiks sayd ..

As was said once before "exec" is not sent to the server. It won't work.

Client Side means Not sent to server FFS ...
[sarcasm]
Wait. Are you saying we cannot hook the "exec" command?
[/sarcasm]
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
BustedRider
Senior Member
Join Date: Dec 2008
Location: Canada/QC
Old 09-04-2009 , 04:04   Re: [REQ] Exec Block ?
Reply With Quote #19

lolll
im french and i learned english from gaming but i hope i never been so hard to understand like him XD lol
BustedRider is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode