PDA

View Full Version : @ map end rename and move a file to a directory


stoneyschillhouse
03-13-2016, 11:28
Hi

Is it possible in Sourcepawn to rename and move a file (sqlite) at the end of the map into a subfolder before the map changed?

Thats the codpast from the plugin Save Scores https://forums.alliedmods.net/showthread.php?t=74975

wich contains


public OnMapEnd()
{
if (save_scores_forever && save_scores && !isLAN)
SyncDB();
}
I upload the hole .sp file to this Thread

I want to restore the savescores.sq3 for every map.

The file is saved in /addons/sourcemod/data/sqlite/savescores.sq3

I want to restore it like savescores-[mapname]-[date].sp3 in a subfolder

/addons/sourcemod/data/sqlite/savescores-restore/savescores-de_dust2-20160309-0052.sq3 (like Auto Record STV)


Or is there a other way to realize it otherwise to move and rename this file @ mapend without customizing the savescores.sp ?

thx a lot