hi i need help with my script
#3

Here we are bro! Compiled without error, didn't tested!

pawn Код:
#define COLOR_BOT 0xFF00FFFF

new BotName[24] = "Tony";

public OnPlayerConnect(playerid)
{
    SendBotMessage("i am programed to talk to you !");
    return 1;
}

forward SendBotMessage(msg[]);
public SendBotMessage(msg[])
{
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
        if(IsPlayerConnected(playerid)==1 && GetPlayerColor(playerid) != 0)
        {
            new pName[18];
            format(pName,sizeof(pName),"%s",PlayerName(playerid));
            new ColorSave = GetPlayerColor(playerid);
            SetPlayerColor(playerid,COLOR_BOT);
            SetPlayerName(playerid,BotName);
            SendPlayerMessageToAll(playerid,msg);
            SetPlayerColor(playerid,ColorSave);
            SetPlayerName(playerid,pName);
            return 1;
        }
    }
    return 1;
}

stock PlayerName(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}

public OnPlayerText(playerid, text[])
{
    if(!strcmp(text, "hi", true) || !strcmp(text, "hello", true) || !strcmp(text, "hey", true) || !strcmp(text, "sup", true)) // player words/sentences !
    {
        SendPlayerMessageToAll(playerid, text);
        SendBotMessage(" How Are You Today!"); // respond message
        SendBotMessage("Whats your name!"); // respond message
        return 0;
    }
    return 1;
}
If you still have error send your script and i will add it to your script!
Reply


Messages In This Thread
hi i need help with my script - by raptors - 10.07.2012, 11:49
Re: hi i need help with my script - by Warfish - 10.07.2012, 12:00
Re: hi i need help with my script - by RedJohn - 10.07.2012, 12:04
Re: hi i need help with my script - by Avi57 - 10.07.2012, 13:05

Forum Jump:


Users browsing this thread: 1 Guest(s)