sourcemod/plugins/testsuite/fwdtest2.sp
Scott Ehlert 251cced1f8 Spring Cleaning, Part Ichi (1)
Various minor things done to project files
Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way)
Updated regex project file and makefile

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
2008-03-30 07:00:22 +00:00

44 lines
1.3 KiB
SourcePawn

#include <sourcemod>
public Plugin:myinfo =
{
name = "Forward Testing Lab #2",
author = "AlliedModders LLC",
description = "Tests suite #2 for forwards created by plugins",
version = "1.0.0.0",
url = "http://www.sourcemod.net/"
};
public Action:OnPrivateForward(num, const String:format[], ...)
{
decl String:buffer[128];
PrintToServer("Inside private forward #2");
PrintToServer("num = %d (expected: %d)", num, 24);
VFormat(buffer, sizeof(buffer), format, 3);
PrintToServer("buffer = \"%s\" (expected: \"%s\")", buffer, "I am a format string: 0 1 2 3 4 5");
PrintToServer("End private forward #2");
return Plugin_Handled;
}
public OnGlobalForward(Function:a, b, Float:c, const String:d[], Float:e[3], &f, &Float:g)
{
PrintToServer("Inside global forward \"OnGlobalForward\"");
PrintToServer("a = %d (expected: %d)", a, 11);
PrintToServer("b = %d (expected: %d)", b, 7);
PrintToServer("c = %f (expected: %f)", c, -8.5);
PrintToServer("d = \"%s\" (expected: \"%s\")", d, "Anata wa doko desu ka?");
PrintToServer("e = %f %f %f (expected: %f %f %f)", e[0], e[1], e[2], 0.0, 1.1, 2.2);
PrintToServer("f = %d (expected %d, setting to %d)", f, 99, 777);
f = 777;
PrintToServer("g = %f (expected %f, setting to %f)", g, 4.215, -0.782);
g = -0.782;
}