Advertisement
FKu

Untitled

FKu
Nov 8th, 2012
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <a_samp>
  2. enum FPS_check
  3. {
  4. lastdrunklevel,
  5. playerfps,
  6. fpsshow
  7. }
  8. new fpsc[MAX_PLAYERS][FPS_check];
  9. forward DisplayFPS();
  10.  
  11. public OnGameModeInit()
  12. {
  13. SetTimer("DisplayFPS",1000,1);
  14. return 1;
  15. }
  16.  
  17. public OnPlayerUpdate(playerid)
  18. {
  19. fpsc[playerid][playerfps] = GetPlayerPing(playerid);
  20. }
  21.  
  22.  
  23. public DisplayFPS()
  24. {
  25. new FPSmsg[10];
  26. for(new i; i < MAX_PLAYERS; i++)if(IsPlayerConnected(i))
  27. {
  28. format(FPSmsg,10,"ping: %d",fpsc[i][playerfps]);
  29. CreatePlayer3DTextLabel(i,FPSmsg,0x969696FF,0,0,0,10);
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement