SA-MP Forums Archive
Npc label:S - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Npc label:S (/showthread.php?tid=253361)



Npc label:S - Admigo - 06.05.2011

Heey guys.
I want to make a label above the npcs head but i get errors.
pawn code:
Код:
	if(IsPlayerNPC(playerid)) //Kijken of de gespawnde speler een NPC is
  	{
   	new npcname[MAX_PLAYER_NAME];
   	GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Traindriver1", true)) //Kijken of de naam klopt
    {
      PutPlayerInVehicle(playerid, train1, 0); //NPC in zijn voertuig stoppen
      traindriver1[playerid] = Create3DTextLabel("[BOT]Traindriver1",COLOR_GREEN,30.0,40.0,50.0,40.0,0);
      Attach3DTextLabelToPlayer(traindriver1[playerid], playerid, 0.0, 0.0, 0.7);

    }
    else if(!strcmp(npcname, "Traindriver2", true))
    {
      PutPlayerInVehicle(playerid, train2, 0);
      traindriver2[playerid] = Create3DTextLabel("[BOT]Traindriver2",COLOR_GREEN,30.0,40.0,50.0,40.0,0);
      Attach3DTextLabelToPlayer(traindriver2[playerid], playerid, 0.0, 0.0, 0.7);

    }
    else if(!strcmp(npcname, "Traindriver3", true))
    {
      PutPlayerInVehicle(playerid, train3, 0);
      traindriver3[playerid] = Create3DTextLabel("[BOT]Traindriver3",COLOR_GREEN,30.0,40.0,50.0,40.0,0);
      Attach3DTextLabelToPlayer(traindriver3[playerid], playerid, 0.0, 0.0, 0.7);
    }
errors:
Код:
C:\Users\...\Desktop\GTA San Andreas\gamemodes\coanro2.pwn(2409) : warning 213: tag mismatch
C:\Users\...\Desktop\GTA San Andreas\gamemodes\coanro2.pwn(2410) : warning 213: tag mismatch
C:\Users\...\Desktop\GTA San Andreas\gamemodes\coanro2.pwn(2416) : warning 213: tag mismatch
C:\Users\...\Desktop\GTA San Andreas\gamemodes\coanro2.pwn(2417) : warning 213: tag mismatch
C:\Users\...\Desktop\GTA San Andreas\gamemodes\coanro2.pwn(2423) : warning 213: tag mismatch
C:\Users\...\Desktop\GTA San Andreas\gamemodes\coanro2.pwn(2424) : warning 213: tag mismatch
Pls help!
Thanks Admigo


Re: Npc label:S - Admigo - 06.05.2011

FIXED