09.03.2013, 18:41
yes no errors when /* */
And if i try to use if (strfind(text, "stupid bot") != -1) or any else string comparator the crash happen.
Edit: I will attach whole code to see it.
Compiler say everything is OK. And any chat from player samp-npc crash.
And if i try to use if (strfind(text, "stupid bot") != -1) or any else string comparator the crash happen.
Edit: I will attach whole code to see it.
pawn Код:
//
// NPC Test Script
// Kye 2009
//
#include <a_npc>
//------------------------------------------
main()
{
printf("npcidle: running");
}
//------------------------------------------
//------------ Talk TEST -------------------
public OnPlayerText(playerid, text[])
{
if (strfind(text, "stupid bot") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Hey %s! Don't say those things! We, bots, are cool!", name);
SendChat(string);
}
return 1;
}
//////////////////////////////////////////////