Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Author: Bruno da Silva
- * Site: www.ips-team.blogspot.com
- * Date: 02:58 23/08/2011
- * (C) Copyright [iPs]TeaM
- */
- #include a_samp
- main()
- {
- return state debugUpdate:sim, true;
- }
- new
- string[30],
- updateTick[MAX_PLAYERS char],
- diferenceTimes[MAX_PLAYERS char];
- /*
- Debug your OnPlayerUpdate using Game Text
- The code shows the amount of calls for onplayerupdate in ms (20 ~ 500 ms)
- */
- public OnPlayerUpdate(playerid) <debugUpdate:sim>
- {
- diferenceTimes{playerid} = GetTickCount() - updateTick{playerid};
- format(string, sizeof(string), "OnPlayerUpdate: %d ms", diferenceTimes{playerid});
- GameTextForPlayer(playerid, string, 100, 4);
- return updateTick{playerid} = GetTickCount(), true;
- }
- public OnPlayerUpdate(playerid) <debugUpdate:nao>
- {
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement