SA-MP Forums Archive
NPC heli how is wrong - 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: NPC heli how is wrong (/showthread.php?tid=238853)



NPC heli how is wrong - imosek - 12.03.2011

Hello! I'm makking a BOT NPC now. Helicopter has fly in a particular place. Heli starts from one place and then back to this place.
I recorded file policeheli.rec

In ncpmodes i make a policeheli.amx:
Код:
#define RECORDING "policeheli"
#define RECORDING_TYPE 1 

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
and i make a filterscript:

Код:
#include <a_samp>

new PoliceHeli;


public OnGameModeInit()
{
	ConnectNPC("PoliceHeli","policeheli");
	PoliceHeli =	AddStaticVehicle(497,-1679.7006,705.9991,30.7217,89.8752,0,1); // heli
	return 1;
}

public OnPlayerSpawn(playerid)
{
    if(!IsPlayerNPC(playerid)) return 0; // We only deal with NPC players in this script
	new playername[64];
	GetPlayerName(playerid,playername,64);
	if(!strcmp(playername,"PoliceHeli",true)) {
        SetSpawnInfo( playerid, 0, 285, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
	    PutPlayerInVehicle(playerid, PoliceHeli, 0);
	    ShowPlayerMarkers(0);
	}

I gdy

    return 1;
}
And now how i am on the server bot is connected....and i go to the place where heli is..... and BOT is standing near the heli.....and the heli doesn't fly?? why What is wrong??


Re: NPC heli how is wrong - Stigg - 12.03.2011

Have you put the npc file into the correct folder ?


Re: NPC heli how is wrong - imosek - 12.03.2011

yes.....policeheli.amx in npcmodes
policeheli.rec in npcmodes/recordings/
and police.amx to filterscripts


Re: NPC heli how is wrong - imosek - 12.03.2011

please help...