aduty removes the player blip from radar
#1

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;
}
Reply
#2

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.
Reply
#3

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
Reply
#4

Try this one

SetPlayerColor(playerid, 0x33CC33FF)

instead of 0x33CC3300)
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)