NPC Joins and disconnects?
#1

First off, I've already used this tutorial, http://forum.sa-mp.com/index.php?topic=119947.0


Mini FS
pawn Код:
#define RECORDING "ambulance" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.

#include <a_npc>
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
Blank GM, Doesn't work in my regular GM Either.
pawn Код:
#include <a_samp>
#include <core>
new AmbulanceDrivercar;
main()
{
}
public OnGameModeInit()
{
ConnectNPC ("Soap","ambulance3");
  AmbulanceDrivercar = AddStaticVehicle(416,2016.3534,1257.9493,10.8825,0.0613,1,3); //
return 1;
}

public OnGameModeExit()
{
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, "Soap", true)) //Checking if the NPC's name is MyFirstNPC
                 {
             PutPlayerInVehicle(playerid, AmbulanceDrivercar, 0); //Putting the NPC into the vehicle we created for it.
            return 1;
    }
    }
        return 1;
        }
Reply


Messages In This Thread
NPC Joins and disconnects? - by Anthony_Brassi - 19.06.2010, 00:55
Re: NPC Joins and disconnects? - by Kar - 19.06.2010, 01:03
Re: NPC Joins and disconnects? - by Anthony_Brassi - 19.06.2010, 01:04
Re: NPC Joins and disconnects? - by AK47317 - 19.06.2010, 03:31
Re: NPC Joins and disconnects? - by Anthony_Brassi - 19.06.2010, 16:14

Forum Jump:


Users browsing this thread: 2 Guest(s)