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
#2

Reply
#3

Make sure the .rec files are in the recordings folder and you dont need AddPlayerClass in there either, try change it to SetSpawnInfo and see if that works.
Reply
#4

I got that same problem. In trailer and shamal.
Reply
#5

.rec files are in right place .
Reply
#6

Then try adding SetPawnInfo above PutPlayerInVehicle and take out AddPlayerClass.
Reply
#7

my own recorded npcs wont work but if i used the grove street npcs then the moved :O !
Reply
#8

see if this helps
http://forum.sa-mp.com/index.php?topic=119947.0
soz its all i know. lol
Reply
#9

already tryd that version
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)