Hello, I need help with one little think. I'm really bad at only team view name menu. So I need to make this code to work. If you are T, it will show menu of your team mates. If you are CT, it will show you CT Players.
PHP Code:
public cmd_transfermenu(id)
{
static opcion[64]
formatex(opcion, charsmax(opcion),"Choose player")
new iMenu = menu_create(opcion, "cmd_transfermenu_handler")
new players[32], pnum, tempid
new szName[32], szTempid[10]
{
if(get_user_team(id) == 2)
{
static iPlayers[32], iNum, i, iPlayer;
get_players( iPlayers, iNum, "ae", "CT" );
tempid = players
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
formatex(opcion, charsmax(opcion), "\w%s \y- \r[Points: %d]", szName, jbm_get_user_points(tempid))
menu_additem(iMenu, opcion, szTempid, 0)
}
else
{
static iPlayers[32], iNum, i, iPlayer;
get_players( iPlayers, iNum, "ae", "TERRORIST" );
tempid = players
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
formatex(opcion, charsmax(opcion), "\w%s \y- \r[Points: %d]", szName, jbm_get_user_points(tempid))
menu_additem(iMenu, opcion, szTempid, 0)
}
menu_display(id, iMenu)
}
return PLUGIN_HANDLED
}
Thank you.