How can I do this?
#10

It wont work in 0.2 as bots only exist in 0.3. But you can just save a random message and then send as SendClientMessage

Example from 1 of my scripts
pawn Код:
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;
}
I have a police job where you deliver a letter to a person named "kim". Made this command for fun. It sends a random message when /readletter. Hope it helps
Reply


Messages In This Thread
How can I do this? - by Jeffry - 04.04.2010, 14:17
Re: How can I do this? - by Torran - 04.04.2010, 14:19
Re: How can I do this? - by ScottCFR - 04.04.2010, 14:20
Re: How can I do this? - by Jeffry - 04.04.2010, 14:21
Re: How can I do this? - by Jeffry - 05.04.2010, 11:56
Re: [UNSOLVED]How can I do this? - by Babul - 05.04.2010, 12:12
Re: [UNSOLVED]How can I do this? - by Jeffry - 05.04.2010, 12:29
Re: [UNSOLVED]How can I do this? - by Babul - 05.04.2010, 12:36
Re: [UNSOLVED]How can I do this? - by Jeffry - 05.04.2010, 12:54
Re: [UNSOLVED]How can I do this? - by Desert - 05.04.2010, 13:34

Forum Jump:


Users browsing this thread: 1 Guest(s)