AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   AMX Block Sprays (https://forums.alliedmods.net/showthread.php?t=45567)

Wilson [29th ID] 10-06-2006 00:53

AMX Block Sprays
 
1 Attachment(s)
Very Simple Plugin - I searched for it and couldn't find it...if it's already been made just delete it but I figured I'm probably not the only one. Surprised it's not a console command.

This plugin blocks the use of sprays in game. Not just uploaded ones - spraying period.

USAGE
amx_blocksprays <1/0>
Enables or Disables the plugin

EDIT: DO NOT USE THIS - Use the code in the fourth or fifth reply down to properly block sprays

VEN 10-06-2006 05:10

Re: AMX Block Sprays
 
Do you even know what is the message with ID == 23? It's a tempentity. Basically this plugin blocks all tempentity messages, i.e. most of the effects in the game. I don't think the users of this plugin will be happy.

You should block TE_PLAYERDECAL and also player/sprayer.wav sound.

10Stars 10-06-2006 05:56

Re: AMX Block Sprays
 
you know you can just change the decalfrequency to a higher number then the minutes in your map

VEN 10-06-2006 07:13

Re: AMX Block Sprays
 
Yes, but you still will be able to spray once.

Xanimos 10-06-2006 07:34

Re: AMX Block Sprays
 
Isn't it also reset on kill? So you would be able to spray after every kill.

VEN 10-06-2006 09:02

Re: AMX Block Sprays
 
Yes, on kill and on respawn. Actually i meant that even when you set decalfrequency to the value that greater than timelimit * 60, the player will be able to spray at least once per round.

F34RInc 10-07-2006 06:47

Re: AMX Block Sprays
 
Why not block the impulse command for sprays?

Xanimos 10-07-2006 18:20

Re: AMX Block Sprays
 
You can't block the impulse command.

teame06 10-07-2006 19:16

Re: AMX Block Sprays
 
This is the correct way to stop people from using their spray. If what VEN says about event 23 that it just more than spray. Then that is a bad way of doing this.

Code:
/* USAGE: amx_blocksprays <1/0> -- Enables or Disables Plugin */ #include <amxmodx> #include <engine> #include <amxmisc> #define PLUGIN "Block Sprays" #define VERSION "1.0" #define AUTHOR "29th ID" #define SPRAY 201 new g_pCvarEnabled public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     g_pCvarEnabled = register_cvar("amx_blocksprays", "1") } // Fakemeta way would be Hooking the forward FM_CmdStart. // An example of how to block certain command using FM_CmdStart // <a href="http://forums.alliedmods.net/showthread.php?p=351823#post351823" target="_blank" rel="nofollow noopener">http://forums.alliedmods.net/showthr...823#post351823</a> public client_impulse(id, impulse) {     if(get_pcvar_num(g_pCvarEnabled) && impulse == SPRAY)     {         client_print(id, print_chat, "[AMXX] You are not allowed to spray.");         return PLUGIN_HANDLED;     }     return PLUGIN_CONTINUE; }

VEN 10-08-2006 04:06

Re: AMX Block Sprays
 
Yes, this is correct. Impulses is passed through CmdStart sctructure.

Quote:

If what VEN says about event 23 that it just more than spray. Then that is a bad way of doing this.

I'd say "very bad way". He fully blocked tempentities. No explosion effects, no sparks, no smoke, etc. The plugin is downloaded 33 times and still no complains, amazing!


All times are GMT -4. The time now is 01:19.

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