This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
ToggleThermalVision
GtakillerIV edited this page Dec 21, 2014
·
1 revision
Enables or disables thermal vision for a player
playerid
The player's id.
bool:toggle
Whether to enable it or not.
Can be true
or false
.
0 if the player is not connected
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