#include "script.h"

Player player;				//Reference to actual player
Ped playerPed;				//Reference to actual ped
Vehicle playerVeh;			//Reference to actual vehicle

int upF = 1;
int upM = 1;
int upT = 1;
float fuel = 0.0f;
float mOil = 0.0f;
float tOil = 0.0f;

void ScriptMain()
{
	while (true)
	{
		player = PLAYER::PLAYER_ID();
		playerPed = PLAYER::PLAYER_PED_ID();
		playerVeh = PED::GET_VEHICLE_PED_IS_USING(playerPed);

		fuel += 0.01f*upF;
		if (fuel > 1.0f) upF = -1;
		if (fuel < 0.0f) upF = 1;

		mOil += 0.015f*upM;
		if (mOil > 1.0f) upM = -1;
		if (mOil < 0.0f) upM = 1;

		tOil += 0.005f*upT;
		if (tOil > 1.0f) upT = -1;
		if (tOil < 0.0f) upT = 1;

		DECORATOR::_SET_DECORATOR_FLOAT(playerVeh, "CokeInPossession", fuel);
		DECORATOR::_SET_DECORATOR_FLOAT(playerVeh, "MethInPossession", mOil);
		DECORATOR::_SET_DECORATOR_FLOAT(playerVeh, "WeedInPossession", tOil);

		WAIT(20);
	}
}