08.09.2009, 18:30
This may not effect Windows 7 only, but it's the OS I'm using. When I create an npc using the following code:
Forcing the NPC to spawn and when it connects, it will not send the chat. Was there something I missed?
My test script.
I get a 'asking permission' window when I run the samp-server.exe, then when I try to connect the NPC I get another to asking to run the npc exe, Could this be causing an interference with the npcmode?
pawn Код:
#include <a_npc>
OnNPCSpawn()
{
SendChat("I spawned");
}
My test script.
pawn Код:
#include <a_samp>
OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext[1],"connectnpc",true,10))
{
ConnectNPC(cmdtext[12],"npcmode");//NPCMode was the script above
return 1;
}
if(!strcmp(cmdtext[1],"spawn",true,5))
{
SpawnPlayer(strval(cmdtext[7]));
return 1;
}
}