ListControlObjectName.addRow([ID], [value]);
function ServerCmdAdd(%client, %name){ list.addRow($id++, %name);}
You need to parent a TextListCtrl to the ScrollCtrl. Then use Code: [Select]ListControlObjectName.addRow([ID], [value]);So you can do something like:Code: [Select]function ServerCmdAdd(%client, %name){ list.addRow($id++, %name);}
What does $id++ do?
1: How do you make the Id of name popup to by only saying /add name if that is possible.Code: [Select]// Firstly you need to get the row ID, this can be done by getting the selected row's ID%rowId = listObject.getSelectedID();// Then we need to get the name from the row%name = listObject.getRowTextById(%rowId);// You would then need to use findClientByName to get the client of the player%client = findClientByName(%name);// Then getting the ID of the client is easy%id = %client.bl_id;
// Firstly you need to get the row ID, this can be done by getting the selected row's ID%rowId = listObject.getSelectedID();// Then we need to get the name from the row%name = listObject.getRowTextById(%rowId);// You would then need to use findClientByName to get the client of the player%client = findClientByName(%name);// Then getting the ID of the client is easy%id = %client.bl_id;
This increments the value of $id by 1. Therefore each row will have a unique id.Hope this helps.