textdraw help
#1



Uploaded with ImageShack.us
Код:
/*
Filterscript generated using Zamaroht's TextDraw Editor Version 1.0.
Designed for SA-MP 0.3a.

Time and Date: 2010-5-30 @ 17:12:25

Instructions:
1- Compile this file using the compiler provided with the sa-mp server package.
2- Copy the .amx file to the filterscripts directory.
3- Add the filterscripts in the server.cfg file (more info here:
https://sampwiki.blast.hk/wiki/Server.cfg)
4- Run the server!

Disclaimer:
You have full rights over this file. You can distribute it, modify it, and
change it as much as you want, without having to give any special credits.
*/

#include <a_samp>

new Text:Textdraw0;

public OnFilterScriptInit()
{
	print("Textdraw file generated by");
	print("  Zamaroht's textdraw editor was loaded.");

	// Create the textdraws:
	Textdraw0 = TextDrawCreate(0.000000, 436.000000, "Fuel % Carhealth % Mph %");
	TextDrawBackgroundColor(Textdraw0, 255);
	TextDrawFont(Textdraw0, 1);
	TextDrawLetterSize(Textdraw0, 0.460000, 1.000000);
	TextDrawColor(Textdraw0, -1);
	TextDrawSetOutline(Textdraw0, 1);
	TextDrawSetProportional(Textdraw0, 1);
	TextDrawUseBox(Textdraw0, 1);
	TextDrawBoxColor(Textdraw0, 255);
	TextDrawTextSize(Textdraw0, 259.000000, -21.000000);

	return 1;
}

public OnFilterScriptExit()
{
	TextDrawHideForAll(Textdraw0);
	TextDrawDestroy(Textdraw0);
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
		TextDrawShowForPlayer(playerid, Textdraw0);
	}
	else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
	{
		TextDrawHideForPlayer(playerid, Textdraw0);
	}
	return 1;
}
how do i make carhealth go down mph speed etc..
Reply
#2

You must include a Timer or a Counter. Dunno which. But you must include that in your code.
Reply
#3

Yes. Make a timer every X seconds checking for the vehicles health (GetVehicleHealth) and speed (GetVehicleVelocity).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)