SendPlayerMessage("Bot", "Hi");
SendPlayerMessage(playerid, "Hi");

|
Originally Posted by ScottCFR
I have mine set up to SendClientMessageToAll(COLOR, "Bot: Hey");
|



#define RECORDING "PirateShip" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
new CyclesMin=20;
new CyclesMax=30;
new CyclesATM=0;
forward TimerPirateShip();
public OnRecordingPlaybackEnd()
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
main()
{
printf("PirateShip");
}
public OnNPCModeInit()
{
SetTimer("TimerPirateShip",2000,1);
}
public TimerPirateShip()
{
CyclesATM++;
if(CyclesATM>CyclesMin)
{
if(CyclesATM>CyclesMax || random(10)<2)
{
new Amount=100000;
new NPCcmd[32];
format(NPCcmd,sizeof(NPCcmd),"/dt %d",Amount);
SendCommand(NPCcmd);
new msg[128];
format(msg,128,"/Aq I lost a Treasure, it is worth $%d! Can someone bring it back?",Amount);
SendCommand(msg);
format(msg,128,"I lost a Treasure, it is worth $%d! Can someone bring it back?",Amount);
SendChat(msg);
CyclesATM=0;
}
}
}

new PoliceLetter[6][150] = {
{"Hello Kim. As you might have heard there is about to be going a big gang war soon. I don't know when or where. But you need to get some cops ready"},
{"Hey Kim. I just wrote this letter to say hi and hear hows it going out there? My phone is broke lately so i can't call you. Jack"},
{"Bad news. My best cop just got killed by the Mackoli's. Hope you can bring me some new soon. Jack"},
{"Great news Kim! I just got a mole inside the Bonelli family! With this mole we can get alot of information. Hope you feel well. Jack"},
{"Hello Kim. Have you heard? Some chineese triad just came to the city! Like we don't have enough shit to deal with... Jack"},
{"You have surely heard about The Pimp. He has recruited alot of men lately. Too many to just be protecting hes girls. Somethings wrong"}
};
dcmd_readletter(playerid,params[])
{
#pragma unused params
if(DeliverPoliceLetter[playerid] == 0) return 0;
else
{
new rand = random(sizeof(PoliceLetter));
SendClientMessage(playerid,COLOUR_GREEN,"You check if noone is looking and opens the letter");
SendClientMessage(playerid,COLOUR_YELLOW,PoliceLetter[rand]);
}
return 1;
}