[Include] In-game debug lines
#1

Screenshot:


Download: http://pastebin.com/raw.php?i=iB7JHKst

Available functions:
Код:
InsertDebugLine(line[], ...);
ClearDebugLines();
ToggleDebugLines(playerid);
Example usage:

Код:
CMD:clear(playerid, params[]) {
	if(IsPlayerAdmin(playerid)) {
		ClearDebugLines();
	}
	return true;
}

public OnPlayerUpdate(playerid) {
	if(IsPlayerAdmin(playerid)) {
		static animlib[32], animname[32], idx;
		GetAnimationName((idx = GetPlayerAnimationIndex(playerid)), animlib, 32, animname, 32);

		InsertDebugLine("Current animation: %i: %s, %s", idx, animlib, animname);
	}
	return true;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
	if(IsPlayerAdmin(playerid)) {
		if(PRESSED(KEY_NO)) {
			ToggleDebugLines(playerid);
		}
	}
}
From old thread:
Quote:
Originally Posted by Yashas
Посмотреть сообщение
I believe I can do the same in less than 30 minutes so many won't bother using this include unless you add more features.
Well, truth is, I never had intention for my includes to be mass-used. I just missed pretty simple, but kind of borring to code stuff in forums, so I had to code it myself, and just wanted to share. Maybe someday random internet stranger will come to my thread and will say "WOW, it's exactly what I needed!"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)