[BUG]a_npc.inc -
[DRD]Rodney - 07.08.2010
I can record, but can't make scripts with any NPC's
I got
Inside my GM, when I use commands like:
Код:
SendCommand("dance");
It says
Код:
error 017: undefined symbol "SendCommand"
I have managed to fix this (via other scripters) via adding
Код:
native SendCommand(cmdtext[]);
Into GM, but when I start, it says
Код:
Runtime error 19: Function or File not found.
PLEASE HELP THX IN ADVANCE!!!
Re: [BUG]a_npc.inc -
Vince - 07.08.2010
You cannot use a_npc.inc inside a gamemode. It is used inside NPC scripts ONLY.
The reason why it returns Runtime Error 19 is because that function is not implemented in the samp-server executable, but in the samp-npc executable.
Re: [BUG]a_npc.inc -
[DRD]Rodney - 07.08.2010
Thankx that cleares much up!

(same country, I'm from belgium too) so i should make FS and then how I start it with samp-npc.exe?
Re: [BUG]a_npc.inc -
Vince - 07.08.2010
The files for the NPC go into the npcmodes directory. There are some files in it which will show you how it's being coded. Here's a list of callbacks that can be used inside a npcmode:
https://sampwiki.blast.hk/wiki/Category:NPC
The only two functions that can be used inside a gm/fs are ConnectNPC and IsPlayerNPC.
Re: [BUG]a_npc.inc -
[DRD]Rodney - 07.08.2010
Yes I have .rec files in the scriptfiles, and NPC1.pwn/amx inside npcmodes map, But now what should I do?
Make another FS so I can paste
Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
if(strcmp(NameOf(playerid),"NPC1",false)) SetPlayerSkin(playerid,12);
if(strcmp(NameOf(playerid),"NPC2",false)) SetPlayerSkin(playerid,55);
if(strcmp(NameOf(playerid),"NPC3",false)) SetPlayerSkin(playerid,226);
SendCommand("dance");
}
}
inthere or at NPC1.pwn (one in npcmodes map) file?
Also: I still get this bug
error 017: undefined symbol "SendCommand"
Re: [BUG]a_npc.inc -
[DRD]Rodney - 07.08.2010
I have already noticed that you cannot use #include a_samp and #include a_npc at same time, but how do I setplayerskin then ..?
EDIT: oops sorry for double post
Re: [BUG]a_npc.inc -
r0b - 08.08.2010
Maybe you can set NPC's skin in the Spawn informations? Or is there an another function for setting npc's skins?
Re: [BUG]a_npc.inc -
[DRD]Rodney - 08.08.2010
Quote:
Originally Posted by r0b
Maybe you can set NPC's skin in the Spawn informations? Or is there an another function for setting npc's skins?
|
Spawn information is included in <a_samp>, which i can't use if I want SendCommand();
Re: [BUG]a_npc.inc -
[DRD]Rodney - 08.08.2010
This is weird this makes me feel like no NPC's are possible at anytime
Re: [BUG]a_npc.inc -
Vince - 08.08.2010
Use:
https://sampwiki.blast.hk/wiki/NPC:OnNPCSpawn in your npcmode. You can use SendCommand in there.