10.02.2018, 20:07
I've made a simple textdraw to show player's information when the admins spectate them,
I already have the spec, specoff command, I wanted to know if anyone can explain to me how do I show them while an admin is spectating?
(p.s I've tried to search for a tutorial and I couldn't really find any.)
Код:
new Text:Textdraw0; new Text:Textdraw1; new Text:Textdraw2; new Text:Textdraw3; new Text:Textdraw4; new Text:Textdraw5; new Text:Textdraw6; // In OnGameModeInit prefferably, we procced to create our textdraws: Textdraw0 = TextDrawCreate(14.000000, 250.000000, "_"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdraw0, 0.500000, 6.499998); TextDrawColor(Textdraw0, -1); TextDrawSetOutline(Textdraw0, 0); TextDrawSetProportional(Textdraw0, 1); TextDrawSetShadow(Textdraw0, 1); TextDrawUseBox(Textdraw0, 1); TextDrawBoxColor(Textdraw0, 70); TextDrawTextSize(Textdraw0, 140.000000, 0.000000); Textdraw1 = TextDrawCreate(14.000000, 251.000000, "NAME:"); TextDrawBackgroundColor(Textdraw1, 255); TextDrawFont(Textdraw1, 1); TextDrawLetterSize(Textdraw1, 0.310000, 0.799999); TextDrawColor(Textdraw1, -1); TextDrawSetOutline(Textdraw1, 0); TextDrawSetProportional(Textdraw1, 1); TextDrawSetShadow(Textdraw1, 1); Textdraw2 = TextDrawCreate(14.000000, 262.000000, "ID:"); TextDrawBackgroundColor(Textdraw2, 255); TextDrawFont(Textdraw2, 1); TextDrawLetterSize(Textdraw2, 0.310000, 0.799999); TextDrawColor(Textdraw2, -1); TextDrawSetOutline(Textdraw2, 0); TextDrawSetProportional(Textdraw2, 1); TextDrawSetShadow(Textdraw2, 1); Textdraw3 = TextDrawCreate(13.000000, 273.000000, "FPS:"); TextDrawBackgroundColor(Textdraw3, 255); TextDrawFont(Textdraw3, 1); TextDrawLetterSize(Textdraw3, 0.310000, 0.799999); TextDrawColor(Textdraw3, -1); TextDrawSetOutline(Textdraw3, 0); TextDrawSetProportional(Textdraw3, 1); TextDrawSetShadow(Textdraw3, 1); Textdraw4 = TextDrawCreate(14.000000, 284.000000, "PING:"); TextDrawBackgroundColor(Textdraw4, 255); TextDrawFont(Textdraw4, 1); TextDrawLetterSize(Textdraw4, 0.310000, 0.799999); TextDrawColor(Textdraw4, -1); TextDrawSetOutline(Textdraw4, 0); TextDrawSetProportional(Textdraw4, 1); TextDrawSetShadow(Textdraw4, 1); Textdraw5 = TextDrawCreate(14.000000, 296.000000, "PACKETLOSS:"); TextDrawBackgroundColor(Textdraw5, 255); TextDrawFont(Textdraw5, 1); TextDrawLetterSize(Textdraw5, 0.310000, 0.799999); TextDrawColor(Textdraw5, -1); TextDrawSetOutline(Textdraw5, 0); TextDrawSetProportional(Textdraw5, 1); TextDrawSetShadow(Textdraw5, 1); Textdraw6 = TextDrawCreate(22.000000, 232.000000, "SPECTATOR INFO"); TextDrawBackgroundColor(Textdraw6, 255); TextDrawFont(Textdraw6, 1); TextDrawLetterSize(Textdraw6, 0.379999, 1.499999); TextDrawColor(Textdraw6, -1); TextDrawSetOutline(Textdraw6, 0); TextDrawSetProportional(Textdraw6, 1); TextDrawSetShadow(Textdraw6, 1);
(p.s I've tried to search for a tutorial and I couldn't really find any.)