Raised This Month: $32 Target: $400
 8% 

Flashbang


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
keVn
Member
Join Date: Jun 2006
Old 07-09-2006 , 15:06   Flashbang
Reply With Quote #1

Hey I've found the flashbang item that I've been looking for but you have to be next to the person to flashbang them. And it only works for about 2 seconds.

Quote:
// Item flashbang
public item_flashbang()
{
new arg[32], origin[3], id
read_argv(1,arg,31)
id = str_to_num(arg)
get_user_origin(id,origin)
new players[32], num
get_players(players,num,"ac")
for(new i = 0; i < num;i++)
{
new p_origin[3]
get_user_origin(players[i],p_origin)

if(get_distance(origin,p_origin) <= 70.0)
{
message_begin(MSG_ONE,gmsgFade,{0,0,0},player s[i])
write_short( 1<<15 )
write_short( 1<<12 )
write_short( 1<<12 )
write_byte( 255 )
write_byte( 255 )
write_byte( 255 )
write_byte( 255 )
message_end()
}
}
emit_sound(id,CHAN_BODY, "weapons/sfire-inslow.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
return PLUGIN_HANDLED
Can someone edit it to make it work in like a 5 feet radius or something.
And make it last somewhat 10 seconds?
keVn is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-09-2006 , 15:17   Re: Flashbang
Reply With Quote #2

Code:
if(get_distance(origin,p_origin) <= 70.0)

Change the 70.0 to something larger if you want bigger radius.
Shurik3n is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-09-2006 , 15:22   Re: Flashbang
Reply With Quote #3

Code:
message_begin(MSG_ONE,gmsgFade,{0,0,0},player s[i]) write_short( 1<<15 ) write_short( 1<<12 ) write_short( 1<<12 ) write_byte( 255 ) write_byte( 255 ) write_byte( 255 ) write_byte( 255 ) message_end() message_begin(MSG_ONE,gmsgFade,{0,0,0},player s[i]) write_short( 1<<15 ) write_short( 1<<12 ) write_short( 1<<12 ) write_byte( 255 ) write_byte( 255 ) write_byte( 255 ) write_byte( 255 ) message_end()

i am not sure how to use write_byte/short ect. to well but i believe placing another blind message directly under the end of the message may double the length as it will re-blind people but dont take my word for it, also you will probably get back to full or almost full vision before reblinding so i not too sure
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
keVn
Member
Join Date: Jun 2006
Old 07-09-2006 , 18:28   Re: Flashbang
Reply With Quote #4

Hmm.. it doesn't seem that the things you both said changes anything.
I've set my radius to about 90000. And I've put in atleast 5 of the "message_begin" stuff. Any other ideas?
keVn is offline
keVn
Member
Join Date: Jun 2006
Old 07-10-2006 , 20:17   Re: Flashbang
Reply With Quote #5

So can anyone help me out? The radius doesn't change, and I think if you add more of the gmsgfade it gives it about more half a second more.
keVn is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2006 , 20:20   Re: Flashbang
Reply With Quote #6

i believe the gmsgfade is how fast it fades (aka how long flah will last) try expanding this different amounts to extend it
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
keVn
Member
Join Date: Jun 2006
Old 07-10-2006 , 20:26   Re: Flashbang
Reply With Quote #7

Expand what? What do I edit?
keVn is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-10-2006 , 20:27   Re: Flashbang
Reply With Quote #8

Don't listen to Rolnaaba, gmsgfade is the messageid of the ScreenFade message. It has absolutely nothing to do with how long it lasts.
Shurik3n is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2006 , 20:29   Re: Flashbang
Reply With Quote #9

i said i didnt know lol, he said expand the gmgsfade it increased the time
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-10-2006 , 20:31   Re: Flashbang
Reply With Quote #10

If you don't know then why would you try to tell him something you aren't sure will help. If your trying to help then you should say something helpful. Not something that may or may not work and is just a guess.
Shurik3n 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 18:00.


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