I'm trying to very simply mod the advcommands plugin's mapcfg to work with workshop maps. I just want the basename, I don't want to make the workshop/id dir for each map..
The plugin already includes smlib and I think this is what I need, I just don't know how to implement it. I come from mIRC scripting.. I don't understand the buffer and size for the function.
stock bool:File_GetBaseName(const String:path[], String:buffer[], size)
this is their code:
(I need the basename of map instead of map for %s)
new String:map[64];
GetCurrentMap(map, sizeof(map));
InsertServerCommand("exec mapcfg/%s.cfg", map);
ServerExecute();
bonus: a check to see if the cfg even exists before doing the InsertServerCommand/ServerExecute.