AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove Play From Menu (https://forums.alliedmods.net/showthread.php?t=133764)

GXLZPGX 07-28-2010 15:30

Remove Play From Menu
 
PHP Code:

TempID iPlayers[i];

get_user_nameTempIDszName31 );
num_to_strTempIDszTempID);

menu_additemmenuszNameszTempID); 

I have it make a list of players when someone opens a menu. How could I remove the player who opened the menu from the list?

tm. 07-28-2010 15:45

Re: Remove Play From Menu
 
Code:
TempID = iPlayers[i]; if(id != TempID) {     get_user_name( TempID, szName, 31 );     num_to_str( TempID, szTempID, 9 );     menu_additem( menu, szName, szTempID, 0 ); }

GXLZPGX 07-28-2010 16:06

Re: Remove Play From Menu
 
Quote:

Originally Posted by tm. (Post 1254398)
Code:
TempID = iPlayers[i]; if(id != TempID) {     get_user_name( TempID, szName, 31 );     num_to_str( TempID, szTempID, 9 );     menu_additem( menu, szName, szTempID, 0 ); }

Thank you very much. And one more question, if I wanted to make it display the players team next to their name like..

1. Shadow \rT
2. Shadow \rCT

fysiks 07-28-2010 17:42

Re: Remove Play From Menu
 
after get_user_name()

PHP Code:

switch( cs_get_user_team(TempID) )
{
    case 
CS_TEAM_CTadd(szNamecharsmax(szName), " \rCT")
    case 
CS_TEAM_Tadd(szNamecharsmax(szName), " \rT")




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

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