#include <a_npc> new NPCVAR; main() { print("NPC: ''airport-cityhall'' - Script Initializing."); } public OnNPCModeInit() { print("NPC: ''airport-cityhall'' - Script has been loaded."); return 1; } public OnNPCModeExit() { print("NPC: ''airport-cityhall'' - Script has been unloaded."); return 1; } public OnNPCSpawn() { print("NPC: ''airport-cityhall'' - Spawned."); SendCommand("/ooc Hello everyone! I'm a bot! Have fun :P"); return 1; } public OnRecordingPlaybackEnd() { if(NPCVAR==0) { StopRecordingPlayback(); StartRecordingPlayback(1, "airport2cityhall"); NPCVAR++; return 1; } if(NPCVAR==1) { StopRecordingPlayback(); StartRecordingPlayback(1,"cityhall2airport"); NPCVAR--; return 1; } return 1; } public OnNPCEnterVehicle(vehicleid, seatid) { StopRecordingPlayback(); StartRecordingPlayback(1, "cityhall2airport"); return 1; }
// this is under #include a_samp new npc1car; #define npc1name "Paul_Ference"
// this part is in OnGameModeInit ConnectNPC(npc1name,"airport-cityhall"); npc1car=CreateVehicleEx(420,-2196.8511,965.4650,79.7805,269.1402,6,1,1800,npc1name,0); // Taxi // function of my custom vehicle system. last two parameters are: ownername and price
// part of OnPlayerSpawn if(IsPlayerNPC(playerid)) { new npcname[24]; GetPlayerName(playerid, npcname, 24); if(!strcmp(npcname, npc1name, true)) { SetPlayerPos(playerid,-2196.8511,965.4650,79.7805); PutPlayerInVehicle(playerid, npc1car, 0); //Putting the NPC into the vehicle we created for it. } return 1; }
ConnectNPC("NPCNAME","NPCMODENAME");
#define npc1name "Paul_Ference"
if(!IsPlayerNPC(playerid)) return 0; // We only deal with NPC players in this script
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"NPCNAME",true)) {
PutPlayerInVehicle(playerid, npc1car, 0);
SetSpawnInfo( playerid, 0, 255, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 ); //random position doesnt matter
}
SendCommand("/ooc Hello everyone! I'm a bot! Have fun :P");
#define RECORDING "RECORDINGNAME" //WITHOUT EXTENSION
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
Originally Posted by Tashla
do you have maxnpc [your amount of NPCs] defines in server.cfg?
|
Originally Posted by V1ceC1ty
well you've done it wrong then. look at my sig i dont think i would be wrong.
|
Originally Posted by X Cutter
Quote:
Quote:
|
Originally Posted by X Cutter
Tried what you said but it still doesn't work....
|
Originally Posted by V1ceC1ty
Quote:
|