HeLp mY pliZZzzZzZ
#1

Sometimes just standing in the air.
Need some help with NPC, and make all enter into the game and stands on the site.
A round, and sometimes this errore:
Код:
filterscripts\MojPrviNPC.pwn(17) : error 021: symbol already defined: "OnFilterScriptInit"
filterscripts\MojPrviNPC.pwn(20) : warning 215: expression has no effect
Код:
//Los Santos Vozac Mig
//------------------------------------------------------------------------------
#include <a_samp>
#include <a_npc>
//------------------------------------------------------------------------------
new Guard;
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
  print("moja filterscripta");
  ConnectNPC("MojPrviNPC","mynpc");
  return 1;
}
//------------------------------------------------------------------------------
new MyFirstNPCVehicle; //Globalna variabla!
public OnFilterScriptInit()
{
  print("moja filterscripta");
  ConnectNPC("MojPrviNPC","mynpc");
  MyFirstNPCVehicle; CreateVehicle(520, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  return 1;
}
//------------------------------------------------------------------------------
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC name.
    if(!strcmp(npcname, "[BOT]Guard", true)) //Checking if the NPC's name is [BOT]Guard
    {
      PutPlayerInVehicle(playerid, Guard, 0); //Putting the NPC into the vehicle we created for it.
    }
    return 1;
  }
  return 1;
}
Reply
#2

why is there two public OnFilterScriptInit()
Reply
#3

Well in your script you have used OnFilterScriptInit two times ,so just remove one of them
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)