Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

ToggleThermalVision

GtakillerIV edited this page Dec 21, 2014 · 1 revision

ToggleThermalVision

Enables or disables thermal vision for a player


Parameters

playerid

The player's id.

bool:toggle

Whether to enable it or not.

Can be true or false.

Returns

    0 if the player is not connected

Usage

CMD:togglethermal(playerid, params[])
{
	//If the player has the SA-MP+ plugin installed
	if(IsUsingSAMPP(playerid))
	{
		new bool:toggle;
		if(sscanf(params, "b", toggle)) return SendClientMessage(playerid, -1, "Correct usage: /togglethermal 1/0");

		ToggleThermalVision(playerid, toggle);

		if(toggle)
			SendClientMessage(playerid, -1, "Thermal vision is now enabled");
		else
			SendClientMessage(playerid, -1, "Thermal vision has been disabled");

	}
	//If not
	else
	{
		SendClientMessage(playerid, -1, "You need the SA-MP+ plugin");
	}

	return 1;
}

See Also

ToggleWaterEffect

ToggleNightVision

ToggleWaterBuoyancy

Clone this wiki locally