AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   print a message for a team (https://forums.alliedmods.net/showthread.php?t=299442)

Ayman Khaled 07-14-2017 16:16

print a message for a team
 
Hi.
when someone planting the bomb , i was message & sound appear only for terrorists, seriously i don't know how, i tried many times but nothing
I'm still learning...

PHP Code:

public bomb_plantingid )
{
    new 
name[32], ran;
    
get_user_name(idnamecharsmax(name))
    
    
ran random_num(1)
        
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
client_print(idprint_chat"%s (RADIO): I'm planting the bomb"name)
        switch(
ran)
        {
            case 
0client_cmd(id"spk csgo/radio/elite/plantingbomb01.wav")
            case 
1client_cmd(id"spk csgo/radio/elite/plantingbomb02.wav")
        }
    }



wickedd 07-14-2017 16:24

Re: print a message for a team
 
You will need to loop through the players, then show the message.

Ayman Khaled 07-14-2017 16:25

Re: print a message for a team
 
can you give me an example ?

CrazY. 07-14-2017 16:31

Re: print a message for a team
 
https://forums.alliedmods.net/showthread.php?t=208331

wickedd 07-14-2017 16:39

Re: print a message for a team
 
Read this

PHP Code:

    new player32 ], countnew_indexi
    get_players
playercount )  
    for( 
0counti++ )
    {
        
new_index player];
        if( 
cs_get_user_teamnew_index ) == CS_TEAM_T )
        {
            
//show your meessage
        
}
    } 



All times are GMT -4. The time now is 22:58.

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