Raised This Month: $51 Target: $400
 12% 

amx_all


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
PyRo
Member
Join Date: Mar 2005
Old 05-10-2005 , 18:58   amx_all
Reply With Quote #1

As far as I know this plugin is the only of its type, I had a look for a plugin that would function the same as this one, but I didn't come across one so I created this one

amx_all is a basic plugin that allows you to use everybody on the server as a target for a command even when the command has no @ALL paramater providing you have the correct level to access the command in the first place.

Usage (requires ADMIN_SLAY):
Code:
amx_all [<command> $name <params>]
Examples:
Code:
amx_all amx_kick - Would kick everybody on the server (except those with immunity)
amx_all amx_kick $name Server shutting down - Would kick everybody on the server with the message "Server shutting down" (except those with immunity)
amx_all amx_slap $name 10 - Would slap everybody on the server with 10 damage (except those with immunity)
amx_all say "Moo @ $name" - Would spam the server with "Moo @ "<Player>""
amx_all amx_psay $name This is spam - Would psay everybody on the server with "This is spam"
I hope this plugin is of use to somebody, let me know if you find any bugs and any comments, questions and suggestions are welcome

Pyro
Attached Files
File Type: sma Get Plugin or Get Source (amx_all.sma - 1487 views - 1.9 KB)
__________________
85.133.16.45:27035 - [CPP] Clan Server #1 (fun Maps)
85.133.16.48:27195 - [CPP] Clan Server #2 (Standard/Custom/Fun Maps)
PyRo is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-10-2005 , 19:13  
Reply With Quote #2

why should we do all kick
__________________
- Bye bye!
nightscreem is offline
PyRo
Member
Join Date: Mar 2005
Old 05-10-2005 , 19:20  
Reply With Quote #3

Quote:
Originally Posted by nightscreem
why should we do all kick
I doubt you would, it was just an example, I was trying to keep the examples as general as possible. There are plenty of plugins on here without an @ALL paramater or similar so I thought some people might find this useful.
This should work on any command that accepts a players name as a parameter (it adds quotes around the name so spaces aren't a problem) and it will work with some others that don't (such as say).
__________________
85.133.16.45:27035 - [CPP] Clan Server #1 (fun Maps)
85.133.16.48:27195 - [CPP] Clan Server #2 (Standard/Custom/Fun Maps)
PyRo is offline
-}NK{-Oj@eKiLLzZz
Senior Member
Join Date: Dec 2004
Location: NC
Old 05-10-2005 , 19:41  
Reply With Quote #4

kool man sounds very helpful ima try it out

thanks!
-}NK{-Oj@eKiLLzZz is offline
Send a message via AIM to -}NK{-Oj@eKiLLzZz
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 05-10-2005 , 21:45  
Reply With Quote #5

So...why do you need the $name part? Just delete it so it becomes amx_all amx_tsay "blehblehbleh", instead of making you type the name part as well.
__________________
f1del1ty.oXi is offline
kid741010
Junior Member
Join Date: Feb 2005
Old 05-10-2005 , 22:10  
Reply With Quote #6

yeah
Quote:
Originally Posted by nightscreem
why should we do all kick
kid741010 is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 05-11-2005 , 00:52  
Reply With Quote #7

Quote:
So...why do you need the $name part? Just delete it so it becomes amx_all amx_tsay "blehblehbleh", instead of making you type the name part as well.
if you had "amx_heal NAME 100" and you had taken out the name part, it would do "amx_heal 10 NAME" and the function won't work. So this needs to be on there for stuff like that.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 05-11-2005 , 01:11  
Reply With Quote #8

Hmm...

But still, why does amx_all amx_kick work, when amx_kick needs a target as well? I understand with your example, but I still wonder if it's possible. :\
__________________
f1del1ty.oXi is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 05-11-2005 , 01:21  
Reply With Quote #9

i believe how it works is it gets the name of index 1 and puts his name in place of $name and then gets the name of index2 and puts his name in place of $name untill it gets to 32 then it stops. I haven't cherck the code, that's just how I would suspect its being done
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 05-11-2005 , 01:25  
Reply With Quote #10

Code:
	for (new i = 0;i<=32;i++) {
		if (is_user_connected(i)) {
ok, that is the coding, as I thought, it does get every index from 0 to 32 and checks if they are conencted then runs the command on them.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
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 14:36.


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