How to interact with an npcmode file?
#1

^ Topic says it all.

Example: i want to change a bots recording from a gm/fs without kicking the npc then reconnecting it
Reply
#2

I think you can use CNPC but I dont think theres another way
Reply
#3

without CNPC, it's possible, i've seen it before.. and i asked how to interact with a npcmode pwn file, not making npcs?
Reply
#4

U said interact with the recording, not pwn file, but I guess you could make cmds or that stuff
Reply
#5

npcmodes are not recordings...
Reply
#6

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
Reply
#7

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....
Reply
#8

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
Reply
#9

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)