need help with npc
#1

look that picture . can someone say what is wrong of this code?



my filterscript is like that:

pawn Код:
#include <a_samp>
#include <a_npc>
#define RECORDING "shamal"
#define RECORDING_TYPE 1

main(){}
/*
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
*/

new shamal;
public OnFilterScriptInit()
{
  AddPlayerClass(193,2113.274658, -2420.321044, 14.466621,31.3545,0,0,0,0,0,0);
  print("Shamal Started");
  ConnectNPC("Shamal_Pilot","shamal");
  shamal = CreateVehicle(519, 2113.274658, -2420.321044, 14.466621, 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));
    if(!strcmp(npcname, "Shamal_Pilot", true))
    {
    PutPlayerInVehicle(playerid, shamal, 0);
    }
    return 1;
  }
  return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerCameraPos(playerid, 413.848114, 2532.846191, 19.148437);
  SetPlayerCameraLookAt(playerid, 415.967041, 2530.902587, 19.176570);
  SetPlayerPos(playerid, 415.967041, 2530.902587, 19.176570);
  SetPlayerInterior(playerid, 0);
  SetPlayerFacingAngle(playerid, 51.239612);
  return 1;
}
Reply


Messages In This Thread
need help with npc - by rs2fun111 - 07.01.2010, 19:29
Re: need help with npc - by rs2fun111 - 08.01.2010, 07:57
Re: need help with npc - by V1ceC1ty - 08.01.2010, 08:20
Re: need help with npc - by Mechscape - 08.01.2010, 08:22
Re: need help with npc - by rs2fun111 - 08.01.2010, 08:51
Re: need help with npc - by V1ceC1ty - 08.01.2010, 08:57
Re: need help with npc - by rs2fun111 - 08.01.2010, 09:39
Re: need help with npc - by bluray - 08.01.2010, 10:00
Re: need help with npc - by rs2fun111 - 08.01.2010, 10:01

Forum Jump:


Users browsing this thread: 6 Guest(s)