Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- enum FPS_check
- {
- lastdrunklevel,
- playerfps,
- fpsshow
- }
- new fpsc[MAX_PLAYERS][FPS_check];
- forward DisplayFPS();
- public OnGameModeInit()
- {
- SetTimer("DisplayFPS",1000,1);
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- fpsc[playerid][playerfps] = GetPlayerPing(playerid);
- }
- public DisplayFPS()
- {
- new FPSmsg[10];
- for(new i; i < MAX_PLAYERS; i++)if(IsPlayerConnected(i))
- {
- format(FPSmsg,10,"ping: %d",fpsc[i][playerfps]);
- CreatePlayer3DTextLabel(i,FPSmsg,0x969696FF,0,0,0,10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement