Hello , i have bot in the chat of my server .
when someone will send "Hello Bot" Message the bot will say : Hello , PlayerName !
But Its need to be like this : "PlayerName: Hello Bot [ID:%d]" , Because When player Does not Say Hello Bot Its Will send like this :
Код HTML:
//==============================================================================
//------------------------------------------------------------------------------
// TheBot
//------------------------------------------------------------------------------
//==============================================================================
if(!strcmp(text, "Hi Bot", true) || !strcmp(text, "дйй беи", true) || !strcmp(text, "щмен беи", true))
{
SendPlayerMessageToAll(playerid, text);
format(str,sizeof(str),"! %s щмен",pn);
SendBotMessage(str);
return 0;
}
if(!strcmp(text, "BB Bot", true) || !strcmp(text, "Bye Bot", true) || !strcmp(text, "бйй беи", true) || !strcmp(text, "мдъшаеъ беи", true))
{
SendPlayerMessageToAll(playerid, text);
format(str,sizeof(str),"! ъзжеш бчшеб, %s мдъшаеъ",pn);
SendBotMessage(str);
return 0;
}
if(!strcmp(text, "беи од дщйвешйн бщшъ", true) || !strcmp(text, "беи айк ощъвшйн", true) || !strcmp(text, "беи айк афщш мдщъвш", true))
{
SendPlayerMessageToAll(playerid, text);
SendBotMessage("/Teleports - аъ шщйоъ дщйвешйн дчййойн бщшъ дчмг аъ дфчегд");
return 0;
}
if(!strcmp(text, "беи айк темйн шод", true) || !strcmp(text, "беи тег лод дшйвеъ арй темд шод", true) || !strcmp(text, "беи тег лод дшйвеъ рщаше мй мшод дбад", true))
{
SendPlayerMessageToAll(playerid, text);
SendBotMessage("/NextLevel - аъ осфш ддшйвеъ дгшещеъ мтмеъ мшоък дбад рйъп мбгеч бфчегд");
return 0;
}
if(!strcmp(text, "беи ъбйа ълсу", true) || !strcmp(text, "беи ъбйа лсу", true) || !strcmp(text, "беи лсу", true) || !strcmp(text, "беи ъп лсу", true) || !strcmp(text, "беи афщш лсу", true))
{
SendPlayerMessageToAll(playerid, text);
if(Bot_Money[playerid] == false)
{
new Bot_Money_Rand = random(9000)+1000;
GivePlayerMoney(playerid,Bot_Money_Rand);
format(String,sizeof(String),"чйбмъ %d $ , ъдрд.",Bot_Money_Rand);
SendBotMessage(String);
Bot_Money[playerid] = true;
}
else SendBotMessage(".оцитш, лбш чйбмъ - ъщйв мбг");
}
//==============================================================================
// Tags
//==============================================================================
if(!dini_Exists(GetFileTag(playerid))){
format(TagSysNew, sizeof(TagSysNew), "%s {FFFFFF}[ID: %d]",text, playerid);
SendPlayerMessageToAll(playerid,TagSysNew);
return 0;}
else if(dini_Exists(GetFileTag(playerid))){
format(TagSysNew, sizeof(TagSysNew), "%s {FFFFFF}[ ID: %d | %s{FFFFFF}]",text, playerid,(dini_Get(file,"Tag")));
SendPlayerMessageToAll(playerid,TagSysNew);
return 0;}
how can i do that when someone will send a "Hello Bot" Message its will be like this : "PlayerName: Hello Bot [ID:%d]"