hi i need help with my script
#1

#iinclude <a_samp>
#ddefine COLOUR_BOT 0x33AA33AA
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 && GetPlayerColour{Playerid} !=0
{
new pName[18];
forward{pName,sizeof{pName,"%s",PlayerName{playeri d}};
new ColourSave =GetPlayerColour{playerid};
SetPlayerColour{playerid,COLOUR_BOT};
SetPlayerName{playerid,BotName};
SendPlayerMessageToALL{playerid,Msg};
SetPlayerColour{playerid,ColourSave};
SetPlayerName{playerid,pName};
return 1;
}
}
return 1;
}
stock PlayerName{Playerid}
{
new pName[MAX]_PLAYER_NAME];
GetPlayerName{playerid, pName2, MAX_PLAYER_NAME};
return pName2;
}
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;
}
/* if!{strcmp{text, MESSAGE", true || !strcmp{text, "MESSAGE", true || !strcmp{text, "MESSAGE", true}}
{
SendPlayerMessageToALL{playerid, text};
SendBotMessage{MESSAGE!!!"};
ruturn 0;
}*/ // you can add more messages like this!
return 1;
}
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)