AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   event_sound_start (https://forums.alliedmods.net/showthread.php?t=132165)

Vechta 07-12-2010 14:14

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

Sorry for my english xDDD

Arkshine 07-12-2010 14:21

Re: event_sound_start
 
Hook Ham_Spawn in post, check if player is alive, then the player's flags, and finally give him a weapon with give_item().

Vechta 07-12-2010 14:25

Re: event_sound_start
 
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?

Arkshine 07-12-2010 14:34

Re: event_sound_start
 
Don't know, you don't show the code nor giving any informations.

Vechta 07-12-2010 14:37

Re: event_sound_start
 
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 07-13-2010 03:05

Re: event_sound_start
 
anyone?

RedRobster 07-13-2010 04:57

Re: event_sound_start
 
Where does the "i" come from?

Hunter-Digital 07-13-2010 05:00

Re: event_sound_start
 
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.

Vechta 07-13-2010 05:03

Re: event_sound_start
 
Quote:

Originally Posted by Hunter-Digital (Post 1237480)
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..

Hunter-Digital 07-13-2010 05:18

Re: event_sound_start
 
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() )


All times are GMT -4. The time now is 07:05.

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