Make a player marker invisible
#1

Hi

How do I make a players marker on the map invisible?

I cant use "ShowPlayerMarkers(0);" because I need it so
when a admin goes on duty it will show the admin on the map.
and then when he goes off admin duty then he will be invisible again...

Code:
CMD:adminduty(playerid, params[])
{
	if(pInfo[playerid][pAdminLevel] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorised to use that command.");
	if(GetPVarInt(playerid, "AdminDuty") == 0)
	{
		new str[126];
		SetPlayerColor(playerid, 0xFF9900AA);
		format(str, sizeof(str), "%s is now on duty.", GetName(playerid));
		SendClientMessageToAdmins(COLOR_ORANGE, str, 1);
		SendClientMessageToAll(COLOR_ORANGE, "There is an admin on duty.");
		SetPVarInt(playerid, "AdminDuty", 1);
		return 1;
	}
	if(GetPVarInt(playerid, "AdminDuty") == 1)
	{
		new str[126];
		SetPlayerColor(playerid, 0xFFFFFFFF);
		format(str, sizeof(str), "%s is now off duty.", GetName(playerid));
		SendClientMessageToAdmins(COLOR_ORANGE, str, 1);
		SetPVarInt(playerid, "AdminDuty", 0);			
	}
	return 1;
}
Reply


Messages In This Thread
Make a player marker invisible - by Blademaster680 - 08.10.2014, 21:57
Re: Make a player marker invisible - by Pottus - 08.10.2014, 22:21
Re: Make a player marker invisible - by Crayder - 08.10.2014, 22:39
Re: Make a player marker invisible - by Blademaster680 - 08.10.2014, 23:43
Re: Make a player marker invisible - by Pottus - 09.10.2014, 00:09
Re: Make a player marker invisible - by Crayder - 09.10.2014, 00:51

Forum Jump:


Users browsing this thread: 3 Guest(s)