How to interact with an npcmode file? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to interact with an npcmode file? (
/showthread.php?tid=254641)
How to interact with an npcmode pwn file? -
Donya - 11.05.2011
^ Topic says it all.
Example: i want to change a bots recording from a gm/fs without kicking the npc then reconnecting it
Re: How to interact with an npcmode file? -
marinov - 12.05.2011
I think you can use CNPC but I dont think theres another way
Re: How to interact with an npcmode file? -
Donya - 12.05.2011
without CNPC, it's possible, i've seen it before.. and i asked how to interact with a npcmode pwn file, not making npcs?
Re: How to interact with an npcmode file? -
marinov - 12.05.2011
U said interact with the recording, not pwn file, but I guess you could make cmds or that stuff
Re: How to interact with an npcmode file? -
Donya - 12.05.2011
npcmodes are not recordings...
Re: How to interact with an npcmode pwn file? -
marinov - 12.05.2011
Quote:
Originally Posted by Donya
^ Topic says it all.
Example: i want to change a bots recording from a gm/fs without kicking the npc then reconnecting it
|
you said RECORDING
Re: How to interact with an npcmode file? -
Donya - 12.05.2011
read it again, i meant i want to change a bots "recording" as in "StartRecordingPlayback(RECORDING_TYPE, RECORDING);"....... to StartRecordingPlayback(RECORDING_TYPE, RECORDING2); from the gm....
Re: How to interact with an npcmode file? -
THE_KNOWN - 18.05.2011
there is some cross link thing released by ****** and it has a callback abt some data. you could use it and send some text which the NPC sees and you could change the recording playback in ******es callback
Re: How to interact with an npcmode file? -
MadeMan - 18.05.2011
From NPC to GM:
SendCommand -> OnPlayerCommandText
From GM to NPC:
SendClientMessage -> OnClientMessage
Example:
NPC:
pawn Код:
public OnNPCSpawn()
{
SendCommand("/npcspawn");
return 1;
}
GM:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(IsPlayerNPC(playerid))
{
if(strcmp(cmdtext, "/npcspawn", true) == 0)
{
SendClientMessage(playerid, -1, "/talk");
return 1;
}
return 0;
}
return 0;
}
NPC:
pawn Код:
public OnClientMessage(color, text[])
{
if(strcmp(text,"/talk", true) == 0)
{
SendChat("I just spawned");
return 1;
}
return 1;
}