18.09.2012, 18:02
I cant spawn NPC's. I dont know why.
Here is the code of how I added it:
I have file named "NPC" in my npcmodes and I have a file called "twinkisnpc" in my recordings.
I do not get any errors but it's not spawning them :/
my npc mode
It's connecting the NPC but not actually spawning it...
Here is the code of how I added it:
PHP Code:
ConnectNPC("[BOT]GroveStreet","NPC"); //This is on game mode init
if(IsPlayerNPC(playerid)) //OnPlayerSpawn
{
SetPlayerSkin(playerid,12);
GivePlayerWeapon(playerid,24,99999);
return 1;
}
I do not get any errors but it's not spawning them :/
my npc mode
PHP Code:
#include <a_npc>
main() {}
NextPlayBack()
{
StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOOT,"NPC");
}
public OnRecordingPlaybackEnd()
{
NextPlayBack();
}
public OnNPCSpawn()
{
NextPlayBack();
}
public OnNPCExitVehicle()
{
StopRecordingPlayback();
}
PHP Code:
[20:24:43] [npc:join] [BOT]GroveStreet has joined the server (0:127.0.0.1)