AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   [New] Max players (https://forums.alliedmods.net/showthread.php?t=306278)

FonixPro20 03-24-2018 01:57

[New] Max players
 
1 Attachment(s)
PHP Code:

public fnGetAliveCsTeams:csTeam // csTeam can be CS_TEAM_CT, CS_TEAM_T, CS_TEAM_UNASSIGNED, CS_TEAM_SPECTATOR
{
    new 
iMax get_maxplayers( );
    new 
iCount 0;

    for( new 
iClient 1iClient iMaxiClient++ )
        if( 
is_user_aliveiClient ) )
            if( 
cs_get_user_teamiClient ) == csTeam )
                
iCount++;

    return 
iCount;



man_s_our 03-24-2018 08:49

Re: [New] Welcome MSG + Max Players
 
post it as sma file if you want to submit it as a plugin
or post it in scripting help sub-forum if you want someone to help you

FonixPro20 03-24-2018 22:05

Re: [New] Welcome MSG + Max Players
 
Ok I Will Bro Thanks :up:

WhiteFang1319 03-24-2018 22:09

Re: [New] Welcome MSG + Max Players
 
What's the point of this plugin? Everyone can press TAB and can see who's alive. Even if you're playng a match it doesn't take more than 2 sec

FonixPro20 03-24-2018 22:17

Re: [New] Welcome MSG + Max Players
 
The point gets alive players u can use on hud or chat ...

PHP Code:

public fnGetAliveCsTeams:csTeam // csTeam can be CS_TEAM_CT, CS_TEAM_T, CS_TEAM_UNASSIGNED, CS_TEAM_SPECTATOR
{
    new 
iMax get_maxplayers( );
    new 
iCount 0;

    for( new 
iClient 1iClient iMaxiClient++ )
        if( 
is_user_aliveiClient ) )
            if( 
cs_get_user_teamiClient ) == csTeam )
                
iCount++;

    return 
iCount;


by : marcelowzd

WhiteFang1319 03-25-2018 00:08

Re: [New] Welcome MSG + Max Players
 
Quote:

Originally Posted by FonixPro20 (Post 2584523)
The point is The Alive Players Bro .....

And MSG Just For Fun /// Welcome ( Name ) To Server , Have Fun !! \\\

Alive Players Making by : marcelowzd

Why make a plugin for showing alive players when they can easily use TAB? I'm sure it's much more convenient to them rather than typing /players or binding and then seeing it in chat.

Natsheh 03-25-2018 17:58

Re: [New] Welcome MSG + Max Players
 
It would be better if it shows how many enemies alive left in a hudmessage in the middle of the screen
For example...

5 Enemies Left
4 Allies Left
You are the last hope, and so on...


And maybe read more threads about optimizing code.

marcelowzd 03-28-2018 20:27

Re: [New] Welcome MSG + Max Players
 
Quote:

Originally Posted by FonixPro20 (Post 2584523)
The point is The Alive Players Bro .....

PHP Code:

public fnGetAliveCsTeams:csTeam // csTeam can be CS_TEAM_CT, CS_TEAM_T, CS_TEAM_UNASSIGNED, CS_TEAM_SPECTATOR
{
    new 
iMax get_maxplayers( );
    new 
iCount 0;

    for( new 
iClient 1iClient iMaxiClient++ )
        if( 
is_user_aliveiClient ) )
            if( 
cs_get_user_teamiClient ) == csTeam )
                
iCount++;

    return 
iCount;


And MSG Just For Fun /// Welcome ( Name ) To Server , Have Fun !! \\\

Alive Players Making by : marcelowzd

You don't need to say everywhere that i did this part for you. It is very simple, really.
But i also told you that the first method (the one that used get_players) is also better.

JocAnis 03-29-2018 11:43

Re: [New] Welcome MSG + Max Players
 
wtf...just press tab and see how many alive players

Relaxing 03-30-2018 10:22

Re: [New] Welcome MSG + Max Players
 
Quote:

Originally Posted by JocAnis (Post 2585160)
wtf...just press tab and see how many alive players

It's written for laziness purposes.


All times are GMT -4. The time now is 12:54.

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