15.03.2010, 10:44
Sometimes just standing in the air.
Need some help with NPC, and make all enter into the game and stands on the site.
A round, and sometimes this errore:
Need some help with NPC, and make all enter into the game and stands on the site.
A round, and sometimes this errore:
Код:
filterscripts\MojPrviNPC.pwn(17) : error 021: symbol already defined: "OnFilterScriptInit" filterscripts\MojPrviNPC.pwn(20) : warning 215: expression has no effect
Код:
//Los Santos Vozac Mig
//------------------------------------------------------------------------------
#include <a_samp>
#include <a_npc>
//------------------------------------------------------------------------------
new Guard;
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
print("moja filterscripta");
ConnectNPC("MojPrviNPC","mynpc");
return 1;
}
//------------------------------------------------------------------------------
new MyFirstNPCVehicle; //Globalna variabla!
public OnFilterScriptInit()
{
print("moja filterscripta");
ConnectNPC("MojPrviNPC","mynpc");
MyFirstNPCVehicle; CreateVehicle(520, 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 name.
if(!strcmp(npcname, "[BOT]Guard", true)) //Checking if the NPC's name is [BOT]Guard
{
PutPlayerInVehicle(playerid, Guard, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
return 1;
}

