15.10.2009, 19:56
(
Последний раз редактировалось OFFREAL; 29.06.2011 в 17:24.
)
Function "SetTimerEx" incorrectly works with a string variable!!!
test_timer.pwn (full code)
Server console:
test_timer.pwn (full code)
pawn Код:
#include <a_samp>
forward message1(i, s[], n, x);
forward message2(i, s[], n, x);
public OnGameModeInit()
{
print("Starting timer1...");
SetTimerEx("message1", 5000, false, "isdx", 5, "FIRST text", 555555, 0xABC);
print("Starting timer2...");
SetTimerEx("message2", 10000, false, "isdx", 10, "SECOND text", 111111, 0xDEF);
return 1;
}
public message1(i, s[], n, x)
{
printf("Integer = %i. String = %s. Number = %d. Hex = %x", i, s, n, x);
return 1;
}
public message2(i, s[], n, x)
{
printf("Integer = %i. String = %s. Number = %d. Hex = %x", i, s, n, x);
return 1;
}
Код:
[22:42:46] Starting timer1... [22:42:46] Starting timer2... [22:42:52] Integer = 5. String = SECOND text. Number = 555555. Hex = ABC [22:42:57] Integer = 10. String = SECOND text. Number = 111111. Hex = DEF