public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","BOT");
return 1;
}
new MyFirstNPCVehicle; //Global variable!
public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","BOT");
MyFirstNPCVehicle = CreateVehicle(400, 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.
{
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;
}
#include <a_samp>
public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","bot");
MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
new MyFirstNPCVehicle; //Global variable!
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;
}
print("my filterscript"); - deleted
ConnectNPC("MyFirstNPC","BOT"); - deleted
MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); -I LEFT ONLY THIS LINE AND PUTTED IT NEAR THE TOP OF THE SCRIPT
return 1; - deleted

C:\Program Files\gta.sa\GTA San Andreas\filterscripts\npc_test_2.pwn(7) : error 017: undefined symbol "MyFirstNPCVehicle" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#include <a_samp>
public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","BOT");
return 1;
}
new MyFirstNPCVehicle; //Global variable!
public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","BOT");
MyFirstNPCVehicle = CreateVehicle(400, 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.
{
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;
}
C:\Program Files\gta.sa\GTA San Andreas\filterscripts\npc_test_2.pwn(12) : error 021: symbol already defined: "OnFilterScriptInit" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#include <a_samp>
new MyFirstNPCVehicle; //Global variable!
public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","BOT");
MyFirstNPCVehicle = CreateVehicle(400, 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.
{
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;
}



.
|
Originally Posted by -Ranny[BR
]
I did everything right to put the npc is standing in the spawn, as did a friend has the same thing, I wonder if some ai can pass me a ready script saying where to put every thing is where can I change what's there if I fara jmudar .... please go through pm thanks. ![]() ****** translator. ![]() |
C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(15) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit") C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(18) : error 017: undefined symbol "ConnectNPC" C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(19) : error 017: undefined symbol "plane" C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(19) : error 017: undefined symbol "CreateVehicle" C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(22) : warning 235: public function lacks forward declaration (symbol "OnPlayerSpawn") C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(24) : error 017: undefined symbol "IsPlayerNPC" C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(30) : error 017: undefined symbol "PutPlayerInVehicle" C:\Users\kalvi\Desktop\sa-mp\gamemodes\npcrecord.pwn(36) : warning 203: symbol is never used: "MyFirstNPCVehicle" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
?? i make account for npc but not working

|
Originally Posted by Bearfist
My Bot is invincible =O
..help |