[HELP] only one npc works!
#1

Help me please!
I've finnally got my npc's working but yet i have another problem!
only the one with ID 0 works, my script is the same as other scripts but i only removed the return 1;'s that were at onplayerspawn
help me out here.
Thank you!
Reply
#2

BUMP

And also here's my script
pawn Код:
if(IsPlayerNPC(playerid))// return 1;//kutventjes
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
        if(!strcmp(npcname, "Timmy", true)) //Checking if the NPC's name is MyFirstNPC
            {
      PutPlayerInVehicle(playerid, Timscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 192);
      SetPlayerColor(playerid, C_DRL);
            //return OnPlayerSpawn(playerid);
        }
        else if(!strcmp(npcname, "melvin", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Melvinscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 61);
      SetPlayerColor(playerid, C_DRL);
            //return OnPlayerSpawn(playerid);
        }
        else if(!strcmp(npcname, "wesley", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Wesleyscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 61);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "basje", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Basscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 299);
      SetPlayerColor(playerid, C_DRL);
        //  return 1;
        }
        else if(!strcmp(npcname, "kevin", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Kevinscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 61);
      SetPlayerColor(playerid, C_DRL);
        //  return 1;
        }
        else if(!strcmp(npcname, "jeffreyy", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Jeffreyyscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 287);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "mongoll", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Mongollscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 162);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "gerriee", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Gerrieescar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 287);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "Kenneth", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Kennethscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 287);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "Rockyyy", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Rockyyyscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 100);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "Flappie", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Turismoscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 25);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "Flappai", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Cargoscar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 16);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
        else if(!strcmp(npcname, "Admintje", true)) //Checking if the NPC's name is MyFirstNPC
        {
      PutPlayerInVehicle(playerid, Basecar, 0); //Putting the NPC into the vehicle we created for it.
      SetPlayerSkin(playerid, 287);
      SetPlayerColor(playerid, C_DRL);
      //        return 1;
        }
            //return 1;
        }
Reply
#3

Server.cfg MaxNPc number Change it to ur npcs number
Reply
#4

Quote:
Originally Posted by [GM
LeGenDy ]
Server.cfg MaxNPc number Change it to ur npcs number
I did.
Oh yeah sorry but i forgot to say they all work but i can only see the first one (with id 0) driving!
if i encounter one of the other ones they stop on their path and as soon as i can see 'em they stand on the top of the car!
the only strange thing is that when i use goto i follow their path (so actaully a ghostpath)
and if i go far away and come back they stand a little further on their path but they keep still.
help me outta here plz.
Reply
#5

Quote:
Originally Posted by WThieves
Quote:
Originally Posted by [GM
LeGenDy ]
Server.cfg MaxNPc number Change it to ur npcs number
I did.
Oh yeah sorry but i forgot to say they all work but i can only see the first one (with id 0) driving!
if i encounter one of the other ones they stop on their path and as soon as i can see 'em they stand on the top of the car!
the only strange thing is that when i use goto i follow their path (so actaully a ghostpath)
and if i go far away and come back they stand a little further on their path but they keep still.
help me outta here plz.
BUMP
Reply
#6

LARP man ?
Reply
#7

Quote:
Originally Posted by Ricop522
LARP man ?
What the hell is LARP?
don't get offtopic
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)