21.11.2011, 17:20
This doesn't even work?
TIMING FOR STRCMP:
TIMING FOR BTXT:
Booyaka is zero, which means the whole function wasn't even called.
Here's my testing script:
TIMING FOR STRCMP:
Код:
TIME: 1059 BOOYAKA: 1000000
Booyaka is zero, which means the whole function wasn't even called.
Код:
TIME: 44 BOOYAKA: 0
pawn Код:
#include <a_samp>
new booyakabooyaka;
#include <btxt>
TEXT:hello(playerid, params[])
{
booyakabooyaka++;
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
/*public OnPlayerText(playerid, text[])
{
if(!strcmp("hello", text, true))
{
booyakabooyaka++;
}
return 1;
}*/
main()
{
print("\n----------------------------------");
print(" Bare Script\n");
print("----------------------------------\n");
return 1;
}
public OnGameModeInit()
{
new check1 = GetTickCount();
for(new i; i < 1000000; i++)
{
OnPlayerText(0, "hello");
}
new check2 = GetTickCount();
printf("TIME: %d BOOYAKA: %d", check2-check1, booyakabooyaka);
return 1;
}