|
ds@621
|
1 |
#include <sourcemod> |
|
ds@621
|
2 |
|
|
ds@621
|
3 |
public Plugin:myinfo = |
|
ds@621
|
4 |
{ |
|
ds@621
|
5 |
name = "Forward Testing Lab #2", |
|
ds@621
|
6 |
author = "AlliedModders LLC", |
|
ds@621
|
7 |
description = "Tests suite #2 for forwards created by plugins", |
|
ds@621
|
8 |
version = "1.0.0.0", |
|
ds@621
|
9 |
url = "http://www.sourcemod.net/" |
|
ds@621
|
10 |
}; |
|
ds@621
|
11 |
|
|
ds@621
|
12 |
public Action:OnPrivateForward(num, const String:format[], ...) |
|
ds@621
|
13 |
{ |
|
ds@621
|
14 |
decl String:buffer[128]; |
|
ds@621
|
15 |
|
|
ds@621
|
16 |
PrintToServer("Inside private forward #2"); |
|
ds@621
|
17 |
|
|
ds@621
|
18 |
PrintToServer("num = %d (expected: %d)", num, 24); |
|
ds@621
|
19 |
|
|
ds@621
|
20 |
VFormat(buffer, sizeof(buffer), format, 3); |
|
ds@621
|
21 |
PrintToServer("buffer = \"%s\" (expected: \"%s\")", buffer, "I am a format string: 0 1 2 3 4 5"); |
|
ds@621
|
22 |
|
|
ds@621
|
23 |
PrintToServer("End private forward #2"); |
|
ds@621
|
24 |
|
|
ds@621
|
25 |
return Plugin_Handled; |
|
ds@621
|
26 |
} |
|
ds@621
|
27 |
|
|
ds@621
|
28 |
public OnGlobalForward(Function:a, b, Float:c, const String:d[], Float:e[3], &f, &Float:g) |
|
ds@621
|
29 |
{ |
|
ds@621
|
30 |
PrintToServer("Inside global forward \"OnGlobalForward\""); |
|
ds@621
|
31 |
|
|
ds@621
|
32 |
PrintToServer("a = %d (expected: %d)", a, 11); |
|
ds@621
|
33 |
PrintToServer("b = %d (expected: %d)", b, 7); |
|
ds@621
|
34 |
PrintToServer("c = %f (expected: %f)", c, -8.5); |
|
ds@621
|
35 |
PrintToServer("d = \"%s\" (expected: \"%s\")", d, "Anata wa doko desu ka?"); |
|
ds@621
|
36 |
PrintToServer("e = %f %f %f (expected: %f %f %f)", e[0], e[1], e[2], 0.0, 1.1, 2.2); |
|
ds@621
|
37 |
|
|
ds@621
|
38 |
PrintToServer("f = %d (expected %d, setting to %d)", f, 99, 777); |
|
ds@621
|
39 |
f = 777; |
|
ds@621
|
40 |
|
|
ds@621
|
41 |
PrintToServer("g = %f (expected %f, setting to %f)", g, 4.215, -0.782); |
|
ds@621
|
42 |
g = -0.782; |
|
ds@621
|
43 |
} |