Heey guys.
I want to make a label above the npcs head but i get errors.
Код:
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);
}