1.1 --- a/plugins/test.sma Mon Jan 01 21:31:09 2007 +0000
1.2 +++ b/plugins/test.sma Mon Jan 01 21:46:33 2007 +0000
1.3 @@ -1,4 +1,5 @@
1.4 #include <sourcemod>
1.5 +#include <handles>
1.6
1.7 public Plugin:myinfo =
1.8 {
1.9 @@ -7,22 +8,23 @@
1.10 description = "Tests Stuff",
1.11 version = "1.0.0.0",
1.12 url = "http://www.sourcemod.net/"
1.13 -}
1.14 +};
1.15
1.16 -copy(String:dest[], maxlength, const String:source[])
1.17 -{
1.18 - new len
1.19 -
1.20 - while (source[len] != '\0' && len < maxlength)
1.21 - {
1.22 - dest[len] = source[len]
1.23 - len++
1.24 - }
1.25 -
1.26 - dest[len] = '\0'
1.27 -}
1.28 +native PrintStuff(const String:buffer[]);
1.29
1.30 public bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max)
1.31 {
1.32 - return true
1.33 + new String:buffer[PLATFORM_MAX_PATH];
1.34 + new FileType:type;
1.35 +
1.36 + new Handle:dir = OpenDirectory("addons/stripper");
1.37 + while (ReadDirEntry(dir, buffer, sizeof(buffer), type))
1.38 + {
1.39 + decl String:stuff[1024];
1.40 + Format(stuff, sizeof(stuff), "Type: %d Dir: %s", _:type, buffer)
1.41 + PrintStuff(stuff);
1.42 + }
1.43 + CloseHandle(dir);
1.44 +
1.45 + return true;
1.46 }