NPC bot spam chat OnPlayerText - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: NPC bot spam chat OnPlayerText (
/showthread.php?tid=367311)
NPC bot spam chat OnPlayerText -
[EnErGyS]KING - 09.08.2012
if (strfind(text, "sveiki") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Sveikas %s! Jeigu reikia pagalbos kreipkis б adminus arba /help", name);
SendChat(string);
}
This is code. When i go to server and write "sveiki" Bot is spam 4 messages:First him message is With name another without)
Re: NPC bot spam chat OnPlayerText -
[EnErGyS]KING - 10.08.2012
So none can't help ?
Re: NPC bot spam chat OnPlayerText -
Dawnz - 10.08.2012
Try this.
pawn Код:
if (strfind(text, "sveiki") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Sveikas %s! Jeigu reikia pagalbos kreipkis б adminus arba /help", name);
SendClientMessage(desired color here, string);
}
Re: NPC bot spam chat OnPlayerText -
[EnErGyS]KING - 10.08.2012
Now i have error
pawn Код:
error 017: undefined symbol "SendClientMessage"
Re: NPC bot spam chat OnPlayerText -
Dawnz - 10.08.2012
Did you add a defined color to the line or not?
Re: NPC bot spam chat OnPlayerText -
[EnErGyS]KING - 10.08.2012
Quote:
Originally Posted by Dawnz
Did you add a defined color to the line or not?
|
Yes.
Re: NPC bot spam chat OnPlayerText -
lamarr007 - 10.08.2012
Did you include a_samp?
pawn Код:
//on top your script
#include <a_samp>
Re: NPC bot spam chat OnPlayerText -
[EnErGyS]KING - 10.08.2012
Deleted
Re: NPC bot spam chat OnPlayerText - [jS]Thomas - 10.08.2012
You still need a_samp for sendclientmessage, so if you don't have that, add it.
Re: NPC bot spam chat OnPlayerText -
lamarr007 - 10.08.2012
Quote:
Originally Posted by [EnErGyS]KING
not filescript -_-
|
FAIL -_-"