Advertisement
TheKiller

Untitled

Aug 9th, 2011
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <a_samp>
  2. stock PlayerName(playerid)
  3. {
  4. new Pname[24];
  5. GetPlayerName(playerid, Pname, 24);
  6. return Pname;
  7. }
  8.  
  9. main(){}
  10.  
  11. public OnPlayerConnect(playerid)
  12. {
  13. new string[100];
  14. new t1 = GetTickCount();
  15. for(new x; x<1000000; x++)
  16. {
  17. new Pname[24];
  18. GetPlayerName(playerid, Pname, 24);
  19. format(string, sizeof(string), "Name: %s", Pname);
  20. }
  21. t1 = GetTickCount() - t1;
  22. new t2 = GetTickCount();
  23. for(new x; x<1000000; x++)
  24. {
  25. format(string, sizeof(string), "Name:%s", PlayerName(playerid));
  26. }
  27. t2 = GetTickCount() - t2;
  28. printf("Stock %d, Normal: %d", t2, t1);
  29. return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement