little help ?
#1

Can someone send me an example for attaching 3DTextLabel to NPC ??
Reply
#2

use it as FS.
On top of ur script:
pawn Код:
new Text3D:npc3DTextLabel[MAX_PLAYERS];
Onplayerspawn:
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(!IsPlayerNPC(playerid)) return 1; // We only deal with NPC players in this script
   
    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"mynpc",true)) //put here your NPC name.
    {
        npc3DTextLabel[playerid] = Create3DTextLabel("bla bla bla",0x33FF33AA, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(npc3DTextLabel[playerid],playerid,0.0, 0.0, 0.7);
    }
    return 1;
}
Reply
#3

Don't place your Text3D: variable in OnPlayerSpawn, you're creating 500 new 3d Texts every time an NPC spawns.
Reply
#4

Quote:
Originally Posted by SilentHuntR
Посмотреть сообщение
Don't place your Text3D: variable in OnPlayerSpawn, you're creating 500 new 3d Texts every time an NPC spawns.
Oops o yeah right. Edited.
Reply
#5

thank you
Reply
#6

Quote:
Originally Posted by [CrC]reinixx
Посмотреть сообщение
thank you
No Problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)