AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   use only 2 channels ?¿ (https://forums.alliedmods.net/showthread.php?t=159325)

liryck 06-15-2011 16:48

use only 2 channels ?¿
 
hello there this code comes from rukia plugins, i wanna know if you guys can remake, or if there is a possible to use 2 channels and not 4 in this code.

i want to display something else at the same time, but well 4 channels are in use, and in ESEA - esportsea i saw that them display more than 4 things at time.

PHP Code:

public pug_ready_display_really(Float:hold_time)
{
    static 
readys[1056], notreadys[1056], name[32]

    
readys[0] = '^0'
    
notreadys[0] = '^0'

    
static Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")
    for (
i=0i<playerCounti++)
    {
        
player Players[i]
        
get_user_name(player,name,31)

        if(
pug_players_ready[player]) format(readys,1054,"%s%s^n",readys,name)
        else 
format(notreadys,1054,"%s%s^n",notreadys,name)
    }

    new 
minplayers GET_CVAR_MINPLAYERS()

    
set_hudmessage(025500.750.0700.0hold_time0.00.03)
    
show_hudmessage(0,"Players Not Ready (%d of %d) :",pug_get_players() - pug_total_ready,minplayers )

    
set_hudmessage(025500.080.0700.0hold_time0.00.02)
    
show_hudmessage(0,"Players Ready (%d of %d) :",pug_total_ready,minplayers)

    
set_hudmessage(2552552250.080.1000.0hold_time0.00.01)
    
show_hudmessage(0,readys,1055)

    
set_hudmessage(2552552250.750.1000.0hold_time0.00.04)
    
show_hudmessage(0,notreadys,1055)



bibu 06-15-2011 17:03

Re: use only 2 channels ?¿
 
Try this:

PHP Code:

public pug_ready_display_really(Float:hold_time)
{
    static 
readys[1056], notreadys[1056], name[32]

    
readys[0] = '^0'
    
notreadys[0] = '^0'

    
static Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")
    for (
i=0i<playerCounti++)
    {
        
player Players[i]
        
get_user_name(player,name,31)

        if(
pug_players_ready[player]) format(readys,1054,"%s%s^n",readys,name)
        else 
format(notreadys,1054,"%s%s^n"notreadys,name)
    }

    new 
minplayers GET_CVAR_MINPLAYERS()

    
set_hudmessage(025500.750.0700.0hold_time0.00.0, -1)
    
show_hudmessage(0,"Players Not Ready (%d of %d) :^n^n %s"pug_get_players() - pug_total_ready,minplayersnotreadys )

    
set_hudmessage(025500.080.0700.0hold_time0.00.0, -1)
    
show_hudmessage(0,"Players Ready (%d of %d) :^n^n %s"pug_total_ready,minplayersreadys)



liryck 06-15-2011 17:25

Re: use only 2 channels ?¿
 
nop with your rework, doesnt show the information correctly

with your method
[IMG]http://img32.**************/img32/2969/asdjh.th.png[/IMG]

with the normal code
[IMG]http://img600.**************/img600/2816/asd1v.th.png[/IMG]

bibu 06-16-2011 00:59

Re: use only 2 channels ?¿
 
Sorry, try my updated one now.

liryck 06-16-2011 22:17

Re: use only 2 channels ?¿
 
test it first of all tnx 4 ur help , but look have some problems.

1: the name stay at player not ready when is ready
2: the count 0 of 10 is not showed correctly is like the 0 have a 1 inside

3: not a problema but if its possible to keep the title in green and the players name on white?

[IMG]http://img30.**************/img30/5373/asdur.th.png[/IMG]

bibu 06-17-2011 01:15

Re: use only 2 channels ?¿
 
1) You need to refresh the hud message.
2) same
3) Not possible if you only want to use 2 channels.

liryck 06-17-2011 01:26

Re: use only 2 channels ?¿
 
ty and refreshing it is recalling same func?

bibu 06-17-2011 07:01

Re: use only 2 channels ?¿
 
Exactly.


All times are GMT -4. The time now is 23:26.

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