Bots PMing Back.
#1

I have a PM System like every server and I also have bots.

I would like to know how do you make the bots pm the player back that sent them a private message.

I know you use sendcommand etc, but How do I find out the senders id.

Thanks
Reply
#2

Is it a random rely or a key word reply?
Reply
#3

Random, But this has nothing to do with my question. I just need to know how do I get the id.
Reply
#4

Why not just check if the taget is a NPC and send a client message back to the player?
Reply
#5

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
Why not just check if the taget is a NPC and send a client message back to the player?
Yep, either this, or you use the OnPlayerText callback in the bots script file
Reply
#6

I know you use sendcommand etc, but How do I find out the senders id.
senders id is playerid (simple as that...)
but i suggest you to add check in your PM command

if(IsPlayerNPC(receiver)) return SendClientMessage(playerid,your_color,"Your message");
Reply
#7

Instantly sending a client message looks, feels and is unrealistic.

Use this in your PM command.

pawn Код:
if(IsPlayerNPC(receiver))
{
    SetTimerEx("NPCPMResponse", 5000, false, "ii",receiver,playerid);
}
pawn Код:
public NPCPMResponse(npc,sender)
{
    // You have the senderid and the correct botid
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)