09.03.2011, 15:09
heres the code basicly i start the server and the npc doesnt even attempt to connect WHY
?
this is at the top
this is on gamemodegui
this is on playerspawn
and the npc file and YES THE RECORD FILES ARE THEIR
and max npc is set to : 1
and it doesnt even attempt to join why
thanks

this is at the top
Код:
#include <a_samp> #include <streamer> new MyFirstNPCVehicle; //Global variable!
Код:
MyFirstNPCVehicle = CreateVehicle(541, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); ConnectNPC("MyFirstNPC","mynpc");
Код:
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, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it. } return 1; } //Other stuff for normal players goes here! return 1; }
Код:
#define RECORDING "mynpc" //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
and it doesnt even attempt to join why
