Invisible for enemies - 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: Invisible for enemies (
/showthread.php?tid=526767)
Invisible for enemies -
Onfroi - 19.07.2014
Alright, so I have this code which I thought it would work, but apparently it's wrong, so does anyone know how to make your enemies invisible but your teammates visible (in radar) ?
Thanks in advance
Re: Invisible for enemies -
BroZeus - 19.07.2014
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Quote:
playerid The player that will see the player's changed blip/nametag color
showplayerid The player whose color will be changed
color New color. Set the alpha to 00 for an invisible blip.
|
Re: Invisible for enemies -
xVIP3Rx - 19.07.2014
use
SetPlayerMarkerForPlayer
pawn Код:
SetPlayerMarkerForPlayer( playerid, showplayerid, 0xFFFFFF00));
Re: Invisible for enemies -
rockhopper - 19.07.2014
Here
https://sampwiki.blast.hk/wiki/Colors_List Second topic
Re: Invisible for enemies -
GeekSiMo - 19.07.2014
This is My Command Invibile:
pawn Код:
CMD:invisible(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 4)
{
if(strcmp(params,"on",true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerMarkerForPlayer(i, playerid, 0x00000000);
}
SendClientMessage(playerid, COLOR_YELLOW, "-XSBot-: You are Invisible");
}
else if(strcmp(params,"off",true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerMarkerForPlayer(i, playerid, PlayerInfo[playerid][Color]);
}
SendClientMessage(playerid, COLOR_YELLOW, "-XSBot-: You are Visible");
}
else return SendClientMessage(playerid, COLOR_YELLOW, "-XSBot-: Correct Usage: /invisible on/off");
}
else return SendErrorMessage(playerid, ADMIN_ERROR);
return 1;
}
Re: Invisible for enemies -
Onfroi - 19.07.2014
I already know the function SetPlayerMarkerForPlayer, the question is where is the correct callback to use it? and how to make it work for only your enemies.
Re: Invisible for enemies -
Scottas - 19.07.2014
Correct place would be OnPlayerSpawn (or when player chooses/changes team). To make it only for enemies, check their teams, and if team ids don't match, hide blip.