SA-MP Forums Archive
Hey, Undefined Simbol, send chat - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hey, Undefined Simbol, send chat (/showthread.php?tid=110489)



Hey, Undefined Simbol, send chat - patchkinson - 26.11.2009

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


Re: Hey, Undefined Simbol, send chat - Dak_Cobain - 26.11.2009

Compile with the 0.3 includes.


Re: Hey, Undefined Simbol, send chat - patchkinson - 26.11.2009

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


Re: Hey, Undefined Simbol, send chat - dugi - 26.11.2009

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


Re: Hey, Undefined Simbol, send chat - patchkinson - 26.11.2009

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


Re: Hey, Undefined Simbol, send chat - patchkinson - 26.11.2009

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!!!