AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Writing a chat to all the players, except the specific player. (https://forums.alliedmods.net/showthread.php?t=196956)

Sutar 09-27-2012 05:49

Writing a chat to all the players, except the specific player.
 
Hi everyone, here's the script:

PHP Code:

public CountVotbanPlayer(idkey)
{
    ++
g_VotePlayer[key]
    
    for(new 
0<= get_playersnum(1); i++)
    {
        if(
!= g_banPlayer)
        {
            
client_print(iprint_chat"Player :D")
        }
    }
    
    return 
PLUGIN_CONTINUE


The task of this to write to all players on the server in the chat "Player" but it is written so that the player under g_banPlayer - not to write anything in the chat.

In g_banPlayer I get players in this way:

PHP Code:

g_banPlayer g_menuPlayers[id][g_menuPosition[id] * key]; 


bibu 09-27-2012 06:37

Re: Writing a chat to all the players, except the specific player.
 
Try this:

PHP Code:

public CountVotbanPlayer(idkey)
{
    ++
g_VotePlayer[key]
     
    new 
iPlayers[32], iNumid 
    get_players
(iPlayersiNum
    for(new 
ii<iNumi++) 
    {
        
id iPlayers[i]
        
        if(
id != g_banPlayer)
        {
            
client_print(iprint_chat"Player :D"
        }
    }



Sutar 09-27-2012 07:00

Re: Writing a chat to all the players, except the specific player.
 
Thank you) Now I will check)


All times are GMT -4. The time now is 08:18.

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