SA-MP Forums Archive
[bot] help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [bot] help (/showthread.php?tid=112561)



[bot] help - Mantas7776 - 08.12.2009

Код:
server.cfg
echo Executing Server Config...
lanmode 0
rcon_password bbb
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 GamemodeByMantas7776
filterscripts base fsdebug npcfirst
announce 0
query 1
weburl www.sa-mp.com
maxnpc 20
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
Код:
public OnGameModeInit()
{
	SetGameModeText("Lt server Mantas7776");
	//botas
  ConnectNPC("MyFirstNPC","masina123");
  MyFirstNPCVehicle = CreateVehicle(411, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
Код:
#define RECORDING "masina123" //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
Код:
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;
}
my npc dont connect idk why


Re: [bot] help - Mantas7776 - 08.12.2009

... help mee!!!!!


Re: [bot] help - Correlli - 08.12.2009

Read the NPC tutorial topic CAREFULLY.


Re: [bot] help - Woet - 08.12.2009

'You can bump topics when the last reply is at least 12 hours old.'