Its not working entirely yet but I did manage to get psay to work at least the first time, but all of my normal chat is blocked (that should be easy to fix though).
Code:
public PlayerListCommand(id,key)
{
switch (key)
{
case 7: ShowPlayerListMenu(id,++g_nPlayerListMenuPosition[id])
case 8: ShowPlayerListMenu(id,--g_nPlayerListMenuPosition[id])
case 9: ShowMiscMenu(id, 0)
default:
{
new player = g_menuPlayers2[id][g_nPlayerListMenuPosition[id] * 6 + key]
target[id] = player
new name2[32]
get_user_name(player,name2,31)
if ( PlayerOption2[id] == 1 )
{
sayspecial[id] = 1
}
else if( PlayerOption[id] == 2 )
{
sayspecial[id] = 2
}
new authid[32],authid2[32], name[32]
get_user_authid(id,authid,31)
get_user_authid(player,authid2,31)
get_user_name(id,name,31)
get_user_name(player,name2,31)
ShowPlayerListMenu(id,g_nPlayerListMenuPosition[id])
}
}
}
public DoShowPlayerListMenu(id,level,cid)
{
if (!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED
}
ShowPlayerListMenu(id,g_nPlayerListMenuPosition[id] = 0)
return PLUGIN_HANDLED
}
/////////////////////////////////////////////////////////////////////////////
public say_hook(id)
{
new said[191]
new name[64]
read_args(said,190)
remove_quotes(said)
get_user_name(target[id],name,63)
if( sayspecial[id] != 0 )
{
switch(sayspecial[id])
{
case 1:
{
client_cmd(id,"amx_psay %s %s",name,said)
sayspecial[id] = 0
}
case 2:
{
client_cmd(id,"amx_execclient %s %s",name,said)
sayspecial[id] = 0
}
}
sayspecial[id] = 0
}
return PLUGIN_HANDLED
}
target stores the index of the player chosen from the PlayerListMenu (I think). Now to fix the chat. Thanks for all the help with this.