Raised This Month: $ Target: $400
 0% 

event_sound_start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-12-2010 , 14:14   event_sound_start
Reply With Quote #1

how i can give every admin that have Ban access every round a m4a1 ?

Sorry for my english xDDD
Vechta is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-12-2010 , 14:21   Re: event_sound_start
Reply With Quote #2

Hook Ham_Spawn in post, check if player is alive, then the player's flags, and finally give him a weapon with give_item().
__________________
Arkshine is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-12-2010 , 14:25   Re: event_sound_start
Reply With Quote #3

okey, finally i dont want to give weapon i want to give Bazooka..

I'm using Ham_Spawn, check if player is alive & if he is admin
some rounds my admins got bazooka but sometimes they dont get whats the bug?
Vechta is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-12-2010 , 14:34   Re: event_sound_start
Reply With Quote #4

Don't know, you don't show the code nor giving any informations.
__________________
Arkshine is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-12-2010 , 14:37   Re: event_sound_start
Reply With Quote #5

Code:
RegisterHam(Ham_Spawn, "player", "Admin_bazooka", 1)
Code:
public Admin_bazooka(Player)
{
  	if ( access ( i, ADMIN_BAN ) )
  	{
		if(is_user_alive(Player) && !zp_get_user_zombie(Player))
		{
			has_baz[i] = true;
			CanShoot[i] = true;
			client_print(i, print_center, "You got a free Bazooka!")
			emit_sound(i, CHAN_WEAPON, "items/9mmclip2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
		}
	}
}
Vechta is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-13-2010 , 03:05   Re: event_sound_start
Reply With Quote #6

anyone?
Vechta is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-13-2010 , 04:57   Re: event_sound_start
Reply With Quote #7

Where does the "i" come from?
RedRobster is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-13-2010 , 05:00   Re: event_sound_start
Reply With Quote #8

Does that even compile ? Replace all "i" variables with "Player" or the other way around, your call.
And next time try to follow the compiler's warnings and errors.
__________________
Hunter-Digital is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-13-2010 , 05:03   Re: event_sound_start
Reply With Quote #9

Quote:
Originally Posted by Hunter-Digital View Post
Does that even compile ? Replace all "i" variables with "Player" or the other way around, your call.
And next time try to follow the compiler's warnings and errors.
sorry, my mistake but with Player dont work..
Vechta is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-13-2010 , 05:18   Re: event_sound_start
Reply With Quote #10

Code always works as it should... the problem is that you didn't make it work as you want.

Try to compile the code already... make sure there are no errors or warnings... and then check the if's and variables in the function... remove them if you think some of them *might* not work (like zp_get_user_zombie() )
__________________
Hunter-Digital 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 07:05.


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