Need help with markers - 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: Need help with markers (
/showthread.php?tid=279600)
Need help with markers -
Amel_PAtomAXx - 28.08.2011
Hi ,
im working in RP script so i need to help about
markers on the map
i need to remove them .
They need to show only when admin is on duty.
there's my admin duty code :
pawn Code:
if(strcmp(cmd, "/aduty", true) == 0)
{
new aodName[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid, aodName, sizeof(aodName));
if(IsPlayerConnected(playerid))
{
if(pData[playerid][AdminLevel]>= 1)
{
new Float:Armour,Float:Health;
GetPlayerHealth(playerid,Health);
GetPlayerArmour(playerid,Armour);
if(pData[playerid][pAOnDuty] == 0)
{
SetPlayerColor(playerid, COLOR_YELLOW);
pData[playerid][pAOnDuty] = 1;
SendClientMessage(playerid, COLOR_GREY, "You are now on-duty as an admin.");
format(string, sizeof(string), "%s is now on-duty as an admin.",aodName);
dini_FloatSet(file,"Armour",Armour);
dini_FloatSet(file,"Health",Health);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else
{
SetPlayerColor(playerid, 0xFFFFFFFF);
pData[playerid][pAOnDuty] = 0;
SendClientMessage(playerid, COLOR_GREY, "You are no longer on-duty as an admin.");
format(string, sizeof(string), "%s is no longer on-duty as an admin.",aodName);
SetPlayerArmour(playerid,dini_Int(file, "Armour"));
SetPlayerHealth(playerid,dini_Int(file, "Health"));
SendClientMessageToAll(COLOR_BLUE, string);
return 1;
}
}
}
return 1;
}
Re: Need help with markers -
Pinguinn - 28.08.2011
Change
pawn Code:
SetPlayerColor(playerid, 0xFFFFFFFF);
to
pawn Code:
SetPlayerColor(playerid, 0xFFFFFFAA);
Re: Need help with markers -
knackworst - 28.08.2011
Code:
ShowPlayerMarkers(0);
use that on OnGameModeInit
and then use the following function to show only admins:
Code:
SetPlayerMarkerForPlayer( playerid, put_the_admins_here, put_a_color_here );
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
https://sampwiki.blast.hk/wiki/ShowPlayerMarkers
I use this... but I think that mr cluckinbell script works too...
Re: Need help with markers -
Pinguinn - 28.08.2011
Sorry, it should be
Re: Need help with markers -
Amel_PAtomAXx - 31.08.2011
Thank You knackworst