Nametag not showing over NPC - 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: Nametag not showing over NPC (
/showthread.php?tid=407349)
Nametag not showing over NPC -
captainjohn - 13.01.2013
Ok my NPC spawns and I have added a 3D Text Label over the NPC. However I cannot see the 3D Text Label.
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
new Text3D:Motherdog = Create3DTextLabel("[BOT]Motherdog", 0x33AA33FF, 10.0, 20.0, 20.0, 20.0, 0);
Attach3DTextLabelToPlayer(Motherdog, playerid, 0.0, 0.0, 0.3);
}
return 1;
}
return 1;
}
Re: Nametag not showing over NPC -
Dwayne-Pheonix - 13.01.2013
Try this:
pawn Код:
public OnPlayerSpawn(playerid) {
if(IsPlayerNPC(playerid)) {
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp("Motherdog", npcname, false)) {
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
new Text3D:Motherdog = Create3DTextLabel("[BOT]Motherdog", 0x33AA33FF, 10.0, 20.0, 20.0, 20.0, 0, 0);
Attach3DTextLabelToPlayer(Motherdog, playerid, 0.0, 0.0, 0.3);
}
}
return 1;
}
In strcmp, change the "Motherdog" to the name that you connect the boot.
Re: Nametag not showing over NPC -
captainjohn - 14.01.2013
Quote:
Originally Posted by Dwayne-Pheonix
Try this:
pawn Код:
public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp("Motherdog", npcname, false)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); new Text3D:Motherdog = Create3DTextLabel("[BOT]Motherdog", 0x33AA33FF, 10.0, 20.0, 20.0, 20.0, 0, 0); Attach3DTextLabelToPlayer(Motherdog, playerid, 0.0, 0.0, 0.3); } } return 1; }
In strcmp, change the "Motherdog" to the name that you connect the boot.
|
Hi I tried this and it didn't work.