Hey, Undefined Simbol, send chat
#1

pawn Код:
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! You Remind me of my mother-in-law", name);
    SendChat(string);
  }
  return 1;

}
error 017: undefined symbol "SendChat"
gimme a lil help
Reply
#2

Compile with the 0.3 includes.
Reply
#3

i did
Please help me :-/
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#include <a_npc>
#if defined FILTERSCRIPT
same error
Reply
#4

SendChat can be used only in the NPC modes not filterscripts or gamemodes.
Reply
#5

Quote:
Originally Posted by dugi
SendChat can be used only in the NPC modes not filterscripts or gamemodes.
really=??
thanks then xDDDD
Reply
#6

ok i managed this
pawn Код:
#define RECORDING "shootstart" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.

#include <a_npc>
#include <a_samp>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
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), "Trollbot: Hey %s! You Remind me of my mother-in-law, BOTS ROCK!!", name);
    SendChat(string);
  }

  if (strfind(text, "love") != -1)
  {
    new string[80], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    format(string, sizeof(string), "Trollbot: Hey %s! Your My Girlfriend^^ or BoyFriend :D", name);
    SendChat(string);

  }
  if (strfind(text, "sex") != -1)
  {
    new string[80], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    format(string, sizeof(string), "Trollbot: Who said Sex? Im an Addict :D", name);
    SendChat(string);

  }
  if (strfind(text, "fuck") != -1)
  {
    new string[80], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    format(string, sizeof(string), "Trollbot: Hey %s !!! YOU SAID THE FWORD!! :(", name);
    SendChat(string);

  }
  if (strfind(text, "fuck") != -1)
  {
    new string[80], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    format(string, sizeof(string), "Trollbot: Dont speak bout eating, im hungry", name);
    SendChat(string);

  }
  if (strfind(text, "i hack") != -1)
  {
    new string[80], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    format(string, sizeof(string), "Trollbot: HAHAHA %s No Hacking!!", name);
    SendChat(string);

  }
  return 1;
}
it compiled well but when i say stupid bot, or sex, or stuff like that he does not responde HELP!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)