Npc error 017
#9

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <a_npc>
#if defined FILTERSCRIPT

new MyFirstNPCVehicle; // Now it's a global variable.

public OnFilterScriptInit()
{
  print("my filterscript");
  ConnectNPC("MyFirstNPC","mynpc");
  MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    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's name.
    if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
    {
      PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
    }
    return 1;
  }
  //Other stuff for normal players goes here!
  return 1;
}
Reply


Messages In This Thread
Npc error 017 - by panatha - 16.06.2010, 18:32
Re: Npc error 017 - by Antonio [G-RP] - 16.06.2010, 18:33
Re: Npc error 017 - by (SF)Noobanatior - 16.06.2010, 18:34
Re: Npc error 017 - by panatha - 16.06.2010, 18:35
Re: Npc error 017 - by panatha - 16.06.2010, 18:38
Re: Npc error 017 - by Antonio [G-RP] - 16.06.2010, 18:40
Re: Npc error 017 - by panatha - 16.06.2010, 18:41
Re: Npc error 017 - by panatha - 16.06.2010, 19:22
Re: Npc error 017 - by dcmd_crash - 16.06.2010, 20:46
Re: Npc error 017 - by panatha - 17.06.2010, 08:54

Forum Jump:


Users browsing this thread: 1 Guest(s)