Advertisement
Guest User

Untitled

a guest
Jul 24th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. new gOldMoney[MAX_PLAYERS];
  2. public OnFilterScriptInit()
  3. {
  4. new tick = GetTickCount();
  5. static iM;
  6. iM = GetPlayerMoney(0);
  7. for(new i; i < 1000000;i++)
  8. {
  9. CallLocalFunction("OnPlayerMoneyChange","ii",0,(iM-gOldMoney[0]));
  10. gOldMoney[0] = iM;
  11. }
  12. printf("Static and allocating the iM variable took %i ms",GetTickCount()-tick);
  13.  
  14. tick = GetTickCount();
  15. for(new i; i < 1000000;i++)
  16. {
  17. CallLocalFunction("OnPlayerMoneyChange","ii",0,(GetPlayerMoney(0)-gOldMoney[0]));
  18. gOldMoney[0] = GetPlayerMoney(0);
  19. }
  20. printf("Static and not allocating the iM variable took %i ms",GetTickCount()-tick);
  21. return 1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement