Admin Duty Marker -
WinterAce - 15.07.2012
pawn Код:
CMD:aduty(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first before using that command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
format(string, sizeof(string), "%s is now on duty as an Administrator. /report for any major problems.", RPN(playerid));
SendClientMessageToAll(COLOR_LIME, string);
aDuty[playerid] = 1;
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
SetPlayerColor(playerid,COLOR_LIME);
aDutyText[playerid] = CreateDynamic3DTextLabel("Admin Duty", COLOR_LIME, 0, 0, -20, 25, playerid);
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL,aDutyText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.35);
}
else
{
if(Spec[playerid]) return SendClientMessage(playerid, COLOR_LIGHTRED, "You can not go off admin duty while spectating someone.");
aDuty[playerid] = 0;
format(string, sizeof(string), "%s is now off duty as an Administrator.", RPN(playerid));
SendClientMessageToAll(COLOR_LIME, string);
SetPlayerColor(playerid, COLOR_WHITE);
DestroyDynamic3DTextLabel(aDutyText[playerid]);
}
return 1;
}
I have this code, but when I use /aduty it marks me as green and on the map, then when I use /aduty again to go off duty it marks me as white on the map, how do I make it just so it puts my name back as white and stops showing me on the map?
Re : Admin Duty Marker -
Robert West - 15.07.2012
this is usefull , try to work with it:
it's here
Re: Re : Admin Duty Marker -
WinterAce - 15.07.2012
Quote:
Originally Posted by Robert West
this is usefull , try to work with it:
it's here
|
I don't use SetPlayerMarkerForPlayer as you can see if you looked in my code.
I use SetPlayerColor which is how I don't understand why it sets a player marker on the map when I SetPlayerColor..
Re: Admin Duty Marker - Glint - 15.07.2012
Do you mean when you go off admin duty you won't be visible on the map ?
Edit : Is that what you want to make ?
Re: Admin Duty Marker -
WinterAce - 15.07.2012
Quote:
Originally Posted by Lexi'
Do you mean when you go off admin duty you won't be visible on the map ?
Edit : Is that what you want to make ?
|
Yep that's it, I have tried for hours but can't seem to get it right, it either turns me white on the map when I go off duty or my name disappears from the TAB (players online menu).
Re: Admin Duty Marker - Glint - 15.07.2012
That is weird the code looks fine.
Re: Admin Duty Marker -
tiernantheman - 15.07.2012
This should do the trick possibly.
https://sampwiki.blast.hk/wiki/ShowPlayerMarkers
Re: Admin Duty Marker - Glint - 15.07.2012
When someone joins the server do they have a marker (they can see eachother), or when someone joins no markers are shown ?
EDIT:
I don't think so.
Re: Admin Duty Marker -
WinterAce - 15.07.2012
Quote:
Originally Posted by Lexi'
When someone joins the server do they have a marker (they can see eachother), or when someone joins no markers are shown ?
EDIT:
I don't think so.
|
When I go on duty they can see me in lime colour on the mini map, then when I go off duty sometimes they see me still on the map but in white instead or I go invisible on TAB (player online menu)
Re: Admin Duty Marker - Glint - 15.07.2012
Are you using
zGaming Roleplay ?