NPCs Not Shooting With A Rocket Launcher!?!?
#1

HUH?!?!
The recording file:
http://www.megaupload.com/?d=N76UHGUO
OR
http://rapidshare.com/files/296909270/014r.rec.html
I recorded me shooting with a rocket launcher, the NPC doesn't shoot, he holds a rocket launcher in his hands, moving like he is not synced (fly-bug)
NPC script:
Code:
#define RECORDING "014r"
#define RECORDING_TYPE 2

#include <a_npc>

main(){}

public OnRecordingPlaybackEnd()
{
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
}

public OnNPCSpawn()
{
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
}
the game mode: (in short, there are more NPCs here)
Code:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
 if(!strcmp(npcname, "014r", true))
    {
      SetPlayerSkin(playerid, 180);
    }}}
GivePlayerWeapon(playerid, 33, 99999);
  GivePlayerWeapon(playerid, 22, 99999);
  GivePlayerWeapon(playerid, 16, 99999);
  GivePlayerWeapon(playerid, 35, 99999);
  GivePlayerWeapon(playerid, 30, 99999);
This is even weirder, NPC in a plane is shooting well

Help I'm in panic.

Edit:

NPC with rocket launcher is not shooting but when he switches to ak-47 he is shooting, please tell me something is wrong with my code and this isn't a bug.

server log
Quote:

[06:23:17] Incoming connection: 127.0.0.1:1810
[06:23:17] [npc:join] 001 has joined the server (0:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1811
[06:23:17] [npc:join] 002 has joined the server (1:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1812
[06:23:17] [npc:join] 003 has joined the server (2:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1813
[06:23:17] [npc:join] 004 has joined the server (3:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1814
[06:23:17] [npc:join] 005 has joined the server (4:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1815
[06:23:17] [npc:join] 006 has joined the server (5:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1816
[06:23:17] [npc:join] 007 has joined the server (6:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1817
[06:23:17] [npc:join] 008 has joined the server (7:127.0.0.1)
[06:23:17] Incoming connection: 127.0.0.1:1818
[06:23:17] [npc:join] 009 has joined the server (8:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1825
[06:23:18] [npc:join] 016r has joined the server (15:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1826
[06:23:18] [npc:join] 017r has joined the server (16:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1819
[06:23:18] [npc:join] 010 has joined the server (9:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1820
[06:23:18] [npc:join] 011 has joined the server (10:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1821
[06:23:18] [npc:join] 012 has joined the server (11:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1822
[06:23:18] Incoming connection: 127.0.0.1:1823
[06:23:18] [npc:join] 013 has joined the server (12:127.0.0.1)
[06:23:18] [npc:join] 014r has joined the server (13:127.0.0.1)
[06:23:18] Incoming connection: 127.0.0.1:1824
[06:23:18] [npc:join] 015r has joined the server (14:127.0.0.1)

Reply
#2

Quote:
Originally Posted by Damn Right M.I.A!
pawn Code:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
  {
  new npcname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, npcname, sizeof(npcname));
  if(!strcmp(npcname, "014r", true))
  {
  SetPlayerSkin(playerid, 180);
  }}}
  GivePlayerWeapon(playerid, 33, 99999);
  GivePlayerWeapon(playerid, 22, 99999);
  GivePlayerWeapon(playerid, 16, 99999);
  GivePlayerWeapon(playerid, 35, 99999);
  GivePlayerWeapon(playerid, 30, 99999);
You need not give weapons to the NPC, he will spawn with the weapons used in the record
-
About the code, this code is being compiled?

For me it would be:
pawn Code:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
  {
  new npcname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, npcname, sizeof(npcname));
  if(!strcmp(npcname, "014r", true))
  {
  SetPlayerSkin(playerid, 180);
  GivePlayerWeapon(playerid, 33, 99999);
  GivePlayerWeapon(playerid, 22, 99999);
  GivePlayerWeapon(playerid, 16, 99999);
  GivePlayerWeapon(playerid, 35, 99999);
  GivePlayerWeapon(playerid, 30, 99999);
  }
  }
  return 1;
}
EDIT: Bug confirmed. The NPCs can not shoot with a Rocket Launcher and HS Rocket Launcher
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)