23.12.2012, 23:47
Not quite sure how that even compiled but change
To
pawn Код:
#define FILTERSCRIPT
#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_samp>
#include <a_npc>
#if defined FILTERSCRIPT
new First; //my npc
new Second; //Cheeta driver
new npcname[MAX_PLAYER_NAME];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("My NPC's");
print("--------------------------------------\n");
ConnectNPC("Tim","freeway");
First = CreateVehicle(463, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
ConnectNPC("Frank","cheeta");
Second = CreateVehicle(497, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Tim", true)) //Checking if the NPC's name is MyFirstNPC
SetPlayerSkin(playerid, 248);
{
PutPlayerInVehicle(playerid, First, 1); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
if(!strcmp(npcname, "Frank", true))
{
PutPlayerInVehicle(playerid, Second, 2);
return 1;
}
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
pawn Код:
#include <a_samp>
new First; //my npc
new Second; //Cheeta driver
new npcname[MAX_PLAYER_NAME];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("My NPC's");
print("--------------------------------------\n");
ConnectNPC("Tim","freeway");
First = CreateVehicle(463, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
ConnectNPC("Frank","cheeta");
Second = CreateVehicle(497, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Tim", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid, 248);
PutPlayerInVehicle(playerid, First, 0); //Putting the NPC into the vehicle we created for it.
}
else if(!strcmp(npcname, "Frank", true))
{
PutPlayerInVehicle(playerid, Second, 0);
}
}
return 1;
}