Need help with my NPC`s (gamemode problem)
#5

This is my FS for bots:
Код:
new MyFirstNPCVehicle;
new GrooveBus;
new AllSATram;
new HyundaiCounty;
new MidnightTrain;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	ConnectNPC("Defrago_Driver1","defnpc1");
	ConnectNPC("Defrago_Driver2","defnpc2");
	ConnectNPC("Defrago_Driver3","defnpc3");
	ConnectNPC("Defrago_Driver4","defnpc4");
	ConnectNPC("Defrago_Driver5","defnpc5");
	
	MyFirstNPCVehicle = AddStaticVehicle( 437, 0.0, 0.0, 5.0, 0.0, -1, -1);
	GrooveBus = AddStaticVehicle( 437, 0.0, 0.0, 5.0, 0.0, -1, -1);
	AllSATram = AddStaticVehicle( 449, 0.0, 0.0, 5.0, 0.0, 144, 161);
	HyundaiCounty = AddStaticVehicle( 418, 0.0, 0.0, 5.0, 0.0, 6, 6);
	MidnightTrain = AddStaticVehicle( 538, 0.0, 0.0, 5.0, 0.0, 144, 161);
	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));
			if(!strcmp(npcname, "Defrago_Driver1", true)) //проверяем имя MyFirstNPC
			{
				PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver2", true))
			{
				PutPlayerInVehicle(playerid, GrooveBus, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver3", true))
			{
				PutPlayerInVehicle(playerid, AllSATram, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver4", true))
			{
				PutPlayerInVehicle(playerid, HyundaiCounty, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver5", true))
			{
			    PutPlayerInVehicle(playerid, MidnightTrain, 0);
			    return 1;
			}
			return 1;
		}
	return 1;
}
(All other is default)

I`m part of the team so I can`t change GM (bots are important but not critical).

Код:
if(IsPlayerNPC(playerid)){PutPlayerInVehicle(playerid,vehicleid);return 1;}
- put it WHERE?
Reply


Messages In This Thread
Need help with my NPC`s (gamemode problem) - by Defrago - 27.05.2011, 12:11
Re: Need help with my NPC`s (gamemode problem) - by cs_master - 27.05.2011, 15:10
Re: Need help with my NPC`s (gamemode problem) - by Amel_PAtomAXx - 27.05.2011, 15:25
Re: Need help with my NPC`s (gamemode problem) - by cs_master - 27.05.2011, 15:39
Re: Need help with my NPC`s (gamemode problem) - by Defrago - 27.05.2011, 15:52
Re: Need help with my NPC`s (gamemode problem) - by Defrago - 31.05.2011, 07:02
Re: Need help with my NPC`s (gamemode problem) - by Defrago - 03.06.2011, 15:53

Forum Jump:


Users browsing this thread: 1 Guest(s)