Based on some discussion via SM discord, I created a queue methodmap which inherits from Handle and utilizes arraylist methods. Unlike ArrayStack, this methodmap is First In, First Out.
Code can be found here:
queue.inc
Simple example usage:
Code:
#include <sourcemod>
#include <queue>
public void OnPluginStart() {
RegAdminCmd("sm_test", cmdTest, ADMFLAG_ROOT);
}
public Action cmdTest(int client, int args) {
Queue q = new Queue();
for (int i = 1; i <= 10; i++) {
q.Push(i);
}
while (!q.Empty) {
ReplyToCommand(client, "%i", q.Pop());
}
delete q;
return Plugin_Handled;
}
__________________