Nametag not showing over NPC
#1

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;
}
Reply
#2

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.
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)