PDA

View Full Version : aduty removes the player blip from radar


Ritzy2K
05/05/2016, 02:22 PM
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;
}

CROSS_Hunter
05/05/2016, 02:42 PM
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.

Dayrion
05/05/2016, 02:46 PM
Hm. If you want set the player's blip permantly (not removed from radar) change this :
SetPlayerColor(playerid, 0x33CC3300);
to
SetPlayerColor(playerid, 0x33CC33FF);
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 : http://wiki.sa-mp.com/wiki/Color_list

D3vin
05/05/2016, 02:47 PM
Try this one

SetPlayerColor(playerid, 0x33CC33FF)

instead of 0x33CC3300)

CROSS_Hunter
05/05/2016, 02:49 PM
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