Marker shows the wanted - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Marker shows the wanted (
/showthread.php?tid=79425)
Marker shows the wanted -
JoeDaDude - 28.05.2009
If someone on my rp is wanted,
I want it to light up for all TEAM_COP,
I have ShowPlayerMarkers set to 0
But if someone commits a crime, I want it to show there marker to all cops,
All of them not just one, All of them, How would i do this
Re: Marker shows the wanted -
lol2112 - 28.05.2009
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(TEAM_COP[i] == 1) //you'll need to adjust this bit to however you've set teams up in your server
{
SetPlayerMarkerForPlayer(i, the id of the player who committed the crime, the colour you want to set them to);
}
}
Re: Marker shows the wanted -
JoeDaDude - 28.05.2009
Ok that works ty, But how would i make only one players marker show for everyone,
Not everyones marker for everyone, Just one players marker for everyone, How would i do this,
Example: When a admin is on duty it shows for everyone, Like that, But im using it for a Game helper
Re: Marker shows the wanted -
lol2112 - 28.05.2009
Well the thing I'm not sure about is whether
Код:
ShowPlayerMarkers(0);
sets it so that even if you use SetPlayerMarkerForPlayer then you can't change their marker...
If this is the case then you can do this instead:
Код:
public OnPlayerConnect(playerid)
{
new name[20];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name, "the name of the helper", true) != 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00 )); //this will remove the player's marker.
}
}
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
SetPlayerMarkerForPlayer(i, playerid, pick a colour for your helper);
}
}
}
return 1;
}