Some questions for npcs - 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: Some questions for npcs (
/showthread.php?tid=392483)
Some questions for npcs -
x96664 - 14.11.2012
Hi everybody reading my thread, I got 2 questions related with the npcs.
So the first is how can I set a 3D Label to npc ?
Second is can I remove the NPC map icon ? I mean this one =>
Re: Some questions for npcs -
[KHK]Khalid - 14.11.2012
You can attach a 3D Text Label to a npc just as you attach it to a normal player. Also to hide a player marker on radar, use
SetPlayerMarkerForPlayer.
Re: Some questions for npcs -
x96664 - 14.11.2012
Quote:
Originally Posted by HellSphinX
You can attach a 3D Text Label to a npc just as you attach it to a normal player. Also to hide a player marker on radar, use SetPlayerMarkerForPlayer.
|
Hm about the 3D Label I did it, but I have problem with the marker can you code it ?
Re: Some questions for npcs -
[KHK]Khalid - 14.11.2012
This should work:
pawn Код:
forward HideNPCMarkerForPlayer(npcid, playerid);
public HideNPCMarkerForPlayer(npcid, playerid)
{
SetPlayerMarkerForPlayer(playerid, npcid, 0xFFFFFF00);
return 1;
}
And you can do something like this to hide all NPCs for a player when they connect:
pawn Код:
public OnPlayerConnect(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerNPC(i))
{
HideNPCMarkerForPlayer(i, playerid);
}
}
return 1;
}
Re: Some questions for npcs -
x96664 - 15.11.2012
Quote:
Originally Posted by HellSphinX
This should work:
pawn Код:
forward HideNPCMarkerForPlayer(npcid, playerid); public HideNPCMarkerForPlayer(npcid, playerid) { SetPlayerMarkerForPlayer(playerid, npcid, 0xFFFFFF00); return 1; }
And you can do something like this to hide all NPCs for a player when they connect:
pawn Код:
public OnPlayerConnect(playerid) { for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerNPC(i)) { HideNPCMarkerForPlayer(i, playerid); } } return 1; }
|
Thank you a lot, I will try this.
Re: Some questions for npcs -
Camorra - 15.11.2012
Quote:
Originally Posted by x96664
It just hides the marker only for one of the npcs.
|
You have to add " 00 " at end of color define like " 0xFFFFFF00 ".
" 00 " - Is remove the color from map.