Sounds?
#1

Hey guys I have this code:
pawn Код:
public OnPlayerText(playerid, text[])
{

    if(text[0] == '-')
    {
    new string[100];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string),"::.Dispatch.:: %s: %s", sendername,text[1]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerCop(i))
        {
        SendClientMessage(i,0x0FFDD349,string);
        }
    }
    return 0;
    }
This is dispatch chat for cops, but listen up what I want to make, how can I make if player will write the fallowing:
"-Suspect is in water" it will play sound id 2606

Or how can I make if player will write:

"-Suspect is driving in black "jeep" " it will play sound id 3028

So I would somehow detect what is player writing ... not full sentence maybe only 1 word, how can I script this?
Reply


Messages In This Thread
Sounds? - by Lajko1 - 17.11.2013, 21:59
Re: Sounds? - by DeStunter - 17.11.2013, 22:01
Re: Sounds? - by Lajko1 - 17.11.2013, 22:04
Re: Sounds? - by DeStunter - 17.11.2013, 22:07
Re: Sounds? - by Lajko1 - 17.11.2013, 22:32
Re: Sounds? - by DeStunter - 17.11.2013, 22:37
Re: Sounds? - by Lajko1 - 17.11.2013, 22:39
Re: Sounds? - by Lajko1 - 17.11.2013, 22:51
Re: Sounds? - by DeStunter - 18.11.2013, 02:15

Forum Jump:


Users browsing this thread: 3 Guest(s)