Raised This Month: $94 Target: $400
 23% 

Police! Put your Hands Up!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   GHW_Chronic (70)
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 10-19-2006 , 10:46   Police! Put your Hands Up!
Reply With Quote #1

Police! Put your Hands Up!

Purpose of this plugin is to make realism to CS, that when CT come in to a room, they can shout "Police!". And it has some unique features like autobind and spamfilter.

Code:
/* AMX Mod X Script
*
* ============
* Police! v1.1
*    by Anssik
* ============
*
* Made for request by NemesisDelta
* Sounds from SWAT4 :P
*
* When using console command "police" with appropiate user rights, it
* will shout randomly one of the 6 "Police! Hands Up!" shouts.
*
* Cvars:
*
* amx_police <1/0> - Turns this plugin on/off
*
* amx_police_autobind <1/0> - Automatically binds "police" to clients key
*                             defined in BIND_KEY
*
* amx_police_filter <1/0> - Spam filter on/off. Seconds to wait defined in SPAM_TIME
*
* Defines:
*
* SHOUT_ACCESS - Needed access level to shout Police! (e.g. ADMIN_KICK)
*                0 is for everyone
*
* BIND_KEY - Autobinds "police" to this key on clients
*
* SPAM_TIME - Seconds to wait before be able to shout again
*
*/
EDIT: Now it uses pcvars.

EDIT2: Fixed the volume error. Combined the if statements and removed is_user_connected.

EDIT3: V1.1: Added the spamfilter. Time before can shout again is defined by SPAM_TIME define, defaults to 3.0.
Attached Files
File Type: sma Get Plugin or Get Source (amx_police.sma - 13449 views - 2.4 KB)
File Type: rar police.rar (106.9 KB, 13041 views)
__________________

Last edited by anssik; 10-20-2006 at 05:07.
anssik is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 10-19-2006 , 11:05   Re: Police! Put your Hands Up!
Reply With Quote #2

hm nice
Deviance is offline
Soulseker
Senior Member
Join Date: Sep 2005
Old 10-19-2006 , 12:02   Re: Police! Put your Hands Up!
Reply With Quote #3

ok....only the sounds are special but the
"stop ! Policeman !" can i bind myself^^
Soulseker is offline
NemesisDelta
Senior Member
Join Date: Jul 2006
Location: Germany/Hessen/Kassel
Old 10-19-2006 , 12:32   Re: Police! Put your Hands Up!
Reply With Quote #4

if i press f3 ingame as an ct..the game shuts down and an error message appears:

Fatal error
SV_StartSound: volume = 382

and were to putt the sounds in?

cstrike/sound/<<<<?

like

cstrike/sound/police
. -police1.wav
. -police2.wav
. -police3.wav
. -police4.wav
. -police5.wav
. -police6.wav
__________________

Last edited by NemesisDelta; 10-19-2006 at 12:38.
NemesisDelta is offline
Send a message via ICQ to NemesisDelta
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 10-19-2006 , 13:42   Re: Police! Put your Hands Up!
Reply With Quote #5

Quote:
Originally Posted by NemesisDelta View Post
if i press f3 ingame as an ct..the game shuts down and an error message appears:

Fatal error
SV_StartSound: volume = 382

Code:
emit_sound(id, CHAN_AUTO, g_sounds[random(SOUNDS_NUM)], 1.5, ATTN_NORM, 0, PITCH_NORM)
->
Code:
emit_sound(id, CHAN_AUTO, g_sounds[random(SOUNDS_NUM)], 1.0, ATTN_NORM, 0, PITCH_NORM)
Deviance is offline
Xerxes
Member
Join Date: Jun 2005
Old 10-19-2006 , 14:22   Re: Police! Put your Hands Up!
Reply With Quote #6

Awesome idea.
Xerxes is offline
NemesisDelta
Senior Member
Join Date: Jul 2006
Location: Germany/Hessen/Kassel
Old 10-19-2006 , 14:27   Re: Police! Put your Hands Up!
Reply With Quote #7

Ok this fixes the error...but anssik could you add an spamming-filter like for about 5 seconds in this beautiful Plugin?
__________________
NemesisDelta is offline
Send a message via ICQ to NemesisDelta
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 10-19-2006 , 21:14   Re: Police! Put your Hands Up!
Reply With Quote #8

Its gonna get unapproved.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 10-20-2006 , 00:39   Re: Police! Put your Hands Up!
Reply With Quote #9

PSSST!

Combine these...

PHP Code:
if (!get_pcvar_num(pv_police))
        return 
PLUGIN_HANDLED
if(!is_user_alive(id) || !is_user_connected(id) || !is_valid_ent(id))
        return 
PLUGIN_HANDLED

if(get_user_team(id) != 2)
        return 
PLUGIN_HANDLED 
if is_user_alive(id) is used, there is not a reason to check if they are connected since they cannot be alive without being connected.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Jordan
Veteran Member
Join Date: Aug 2005
Old 10-20-2006 , 00:48   Re: Police! Put your Hands Up!
Reply With Quote #10

Why don't u make it so that like... someone has to drop their weapons or something, because otherwise all you do is push a button and a sound comes out o.o
Jordan is offline
Reply


Thread Tools
Display Modes

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 23:26.


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