SA-MP Forums Archive
SPEEDO? - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SPEEDO? (/showthread.php?tid=581555)



SPEEDO? - alexanderjb918 - 13.07.2015

Okay so i have made some textdraws but im wondering how i put these and make it into a speed radar? anyone got suggestions.

Код:
RadarHud = TextDrawCreate(499.142883, 3.206666, "usebox");
	TextDrawLetterSize(RadarHud, 0.000000, 7.458148);
	TextDrawTextSize(RadarHud, 348.095245, 0.000000);
	TextDrawAlignment(RadarHud, 1);
	TextDrawColor(RadarHud, 0);
	TextDrawUseBox(RadarHud, true);
	TextDrawBoxColor(RadarHud, 102);
	TextDrawSetShadow(RadarHud, 0);
	TextDrawSetOutline(RadarHud, 0);
	TextDrawFont(RadarHud, 0);

	RadarHud = TextDrawCreate(369.523864, 5.546667, "LS-PD SPEED RADAR");
	TextDrawLetterSize(RadarHud, 0.297618, 1.442133);
	TextDrawAlignment(RadarHud, 1);
	TextDrawColor(RadarHud, -1);
	TextDrawSetShadow(RadarHud, 0);
	TextDrawSetOutline(RadarHud, 1);
	TextDrawBackgroundColor(RadarHud, 51);
	TextDrawFont(RadarHud, 1);
	TextDrawSetProportional(RadarHud, 1);

	RadarHud = TextDrawCreate(354.285736, 27.306671, "~n~~r~Speed:         kmph");
	TextDrawLetterSize(RadarHud, 0.164666, 1.194666);
	TextDrawAlignment(RadarHud, 1);
	TextDrawColor(RadarHud, -1);
	TextDrawSetShadow(RadarHud, 0);
	TextDrawSetOutline(RadarHud, 1);
	TextDrawBackgroundColor(RadarHud, 51);
	TextDrawFont(RadarHud, 1);
	TextDrawSetProportional(RadarHud, 1);

	RadarHud = TextDrawCreate(411.047698, 26.880001, "~b~Vehicle Model:");
	TextDrawLetterSize(RadarHud, 0.149428, 1.450667);
	TextDrawAlignment(RadarHud, 1);
	TextDrawColor(RadarHud, -1);
	TextDrawSetShadow(RadarHud, -34);
	TextDrawSetOutline(RadarHud, 0);
	TextDrawBackgroundColor(RadarHud, 51);
	TextDrawFont(RadarHud, 1);
	TextDrawSetProportional(RadarHud, 1);



Re : SPEEDO? - KillerDVX - 14.07.2015

Under "OnGameModeInit" if you are using it in your gamemode, or "OnFilterScriptInit", if it's a FS.

Set a Timer under it, to check the player's speed everytime

Loop it trough all players, i suggest you to use "foreach" as a loop.

Then, make a command to check the player's speed.