09.06.2011, 11:50
Make a repeating timer (every 1sec (1000ms)) and put it OnPlayerSpawn/Connect callback. Don't forget to destroy it on OnPlayerDisconnect callback!
Put this code in it:
And also (very important):
You got this on your script:
new Text:FPSTD;
but you must change it to
new Text:FPSTD[MAX_PLAYERS];
and use it as FPSTD[playerid] (like in my code above) or else it will show the same string to all the players!
Put this code in it:
pawn Код:
new newtext[128];
format(newtext, sizeof(newtext), "Your FPS: %d", GetPlayerFPS(playerid));
TextDrawSetString(FPSTD[playerid], newtext);
You got this on your script:
new Text:FPSTD;
but you must change it to
new Text:FPSTD[MAX_PLAYERS];
and use it as FPSTD[playerid] (like in my code above) or else it will show the same string to all the players!