21.12.2013, 08:07
How to put the name of the npc?? ??
Please example
if(IsPlayerNPC(playerid)) { if(!strcmp(npcname, "Joey", true)) // if You have some more NPCs You'll need this, for an example if You called him " Joey ". { new string[50]; new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); // It's gonna get NPC's name. format(string,sizeof(string),"%s (%d)", name, playerid); // His name and ID. new Text3D:MyNPC = Create3DTextLabel(string, 0xE60000FF, 30.0, 40.0, 50.0, 40.0, 0); // 0xE60000FF - Red colour. Attach3DTextLabelToPlayer(MyNPC, playerid, 0.0, 0.0, 0.7); // This is going to attach 3DTextLabel to the NPC "Joey", above his head. } } // TheViking |