Raised This Month: $ Target: $400
 0% 

Team Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 12-26-2015 , 10:50   Re: Team Menu
Reply With Quote #4

PHP Code:
public cmd_transfermenu(id

static 
opcion[64

formatex(opcioncharsmax(opcion),"Choose player"
new 
iMenu menu_create(opcion"cmd_transfermenu_handler"

static 
iPlayers[32], iNumitempidteamid 

teamid 
cs_get_user_team(id)
get_playersiPlayersiNum); 

   for(
0i<iNumi++ )
   {
       
tempid iPlayers[i
       if(
cs_get_user_team(tempid) == teamid){ 
            
get_user_name(tempidszName31
            
num_to_str(tempidszTempid9

            
formatex(opcioncharsmax(opcion), "\w%s \y- \r[Points: %d]"szNamejbm_get_user_points(tempid)) 
            
menu_additem(iMenuopcionszTempid0
       }
    }

   
menu_display(idiMenu)  

At the top of the plugin don't forget to add:
#define <cstrike>

Because function cs_get_user_team requires module cstrike to be defined.

Last edited by siriusmd99; 12-26-2015 at 10:54.
siriusmd99 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:50.


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