[Include] In-game debug lines - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] In-game debug lines (
/showthread.php?tid=578294)
In-game debug lines -
theYiin - 18.06.2015
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!"