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

o sorry
Reply
#3

'Blank GM, Doesn't work in my regular GM Either.'
Reply
#4

hmm, maybe this help

pawn Код:
ConnectNPC("Soap", "ambulance");
EDIT: its happen to me too but idk how to fix it :P
Reply
#5

Quote:
Originally Posted by AK47317
hmm, maybe this help

pawn Код:
ConnectNPC("Soap", "ambulance");
EDIT: its happen to me too but idk how to fix it :P
i fixed it, mini FS was #define RECORDING "ambulance"

should have been

#define RECORDING "ambulance3"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)