SA-MP Forums Archive
aduty removes the player blip from radar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: aduty removes the player blip from radar (/showthread.php?tid=606508)



aduty removes the player blip from radar - Ritzy2K - 05.05.2016

If the player goes on /aduty his blip is removed from radar, but when he goes off-duty his radar is visible again?
why is that happening
Код:
CMD:aduty(playerid, params[])
{
	if (PlayerData[playerid][pAdmin] < 1)
	    return SendErrorMessage(playerid, "You don't have permission to use this command.");

	if (!PlayerData[playerid][pAdminDuty])
	{
		SetPlayerColor(playerid, 0x33CC3300);

		PlayerData[playerid][pAdminDuty] = 1;
		SendClientMessageToAllEx(COLOR_GREEN, "%s {FFFFFF}Is Now On Admin Duty. {FFFF00}(/report For Assistance).", ReturnName(playerid, 0));
	}
	else
	{
	    SetPlayerColor(playerid, DEFAULT_COLOR);

		PlayerData[playerid][pAdminDuty] = 0;
		SendServerMessage(playerid, "You are no Longer on Admin Duty.");
	}
	return 1;
}



Re: aduty removes the player blip from radar - CROSS_Hunter - 05.05.2016

Well, it could be the "SetPlayerColor(playerid, 0x33CC3300);" I am not so sure tho, maybe try changing the color and see the difference, but as another solution maybe you have a global timer working and checking if the player goes on admin duty, or when this variable is changed to 1 "PlayerData[playerid][pAdminDuty] = 1;" it automatically hides him from the map, you might want to check for that too, it involves using "SetPlayerMarkerForPlayer"

Cheers.


Re: aduty removes the player blip from radar - Dayrion - 05.05.2016

Hm. If you want set the player's blip permantly (not removed from radar) change this :
PHP код:
SetPlayerColor(playerid0x33CC3300); 
to
PHP код:
SetPlayerColor(playerid0x33CC33FF); 
Why? The last 2 characters of the color are the transparency. The color is in hexadecimal with Alpha values (transparency). 0xRRGGBBAA.
00 -> Full transparent
FF -> Max visibility.
Check out this link : https://sampwiki.blast.hk/wiki/Color_list


Re: aduty removes the player blip from radar - D3vin - 05.05.2016

Try this one

SetPlayerColor(playerid, 0x33CC33FF)

instead of 0x33CC3300)


Re: aduty removes the player blip from radar - CROSS_Hunter - 05.05.2016

Oh wow I actually didn't notice he had the transparency set to 00 lmao how stupid I am..And I thought he was using SetPlayerMarkerForPlayer or ShowPlayerMarkers somewhere in the script..god..I am so dumb lmao