22.08.2013, 18:42
Hey,
I can't seem to make my NPC's invisible! It works initially, and by initially I mean when the server restarts and a player is connected, from then on they will be invisible for that player, however if other players connect after the restart (or players that were connected, reconnect), the NPC's will become visible when player's are in range, again.
I set the NPC's colour to 0x00000000 (alpha invisible) in OnPlayerSpawn, and I also use SetPlayerMarkerForPlayer in OnPlayerStreamIn, but to no avail. Can anyone help?
Regards,
Ash
I can't seem to make my NPC's invisible! It works initially, and by initially I mean when the server restarts and a player is connected, from then on they will be invisible for that player, however if other players connect after the restart (or players that were connected, reconnect), the NPC's will become visible when player's are in range, again.
I set the NPC's colour to 0x00000000 (alpha invisible) in OnPlayerSpawn, and I also use SetPlayerMarkerForPlayer in OnPlayerStreamIn, but to no avail. Can anyone help?
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
drugs_NPCSpawn(playerid);
police_NPCSpawn(playerid);
SetPlayerColor(playerid, 0x00000000);
return 1;
}
/*stuff that NPC's dont need*/
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
if(IsPlayerNPC(playerid))
{
SetPlayerMarkerForPlayer(playerid, forplayerid, 0x00000000);
}
return 1;
}
Ash