SA-MP Forums Archive
ayuda, con bots - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: ayuda, con bots (/showthread.php?tid=129073)



ayuda, con bots - [SRG]Toxic_Racer - 20.02.2010

hola amigos, recien estaa viendo este video, y empeze a buscar en todos lados a ver como hacer para que un boto hiciera lo que yo quisiera, o por lo menos que me respondiera para cuando yo le dijera algo, encontre este codigo:

Код:
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;
}
pero me manda un error que dice que dice que no reconoce el SendChat, trate de poner el "a_npc" y me mostro mas errores, lo que quiero pedirles es que mee digan como hago para hacer que un bot haga lo mismo que en este video The SA:MP NPC REVOLUTION - smart acting and performing bots



Re: ayuda, con bots - Zoutdaxv - 20.02.2010

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! Don't say those things! We, bots, are cool!", name);
    SendChat(string);
  }
  return 1;
}
Йsto va en el script del npc, "a_npc" sуlo se puede usar en esos scripts.


Re: ayuda, con bots - [SRG]Toxic_Racer - 20.02.2010

Quote:
Originally Posted by Infierno
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! Don't say those things! We, bots, are cool!", name);
    SendChat(string);
  }
  return 1;
}
Йsto va en el script del npc, "a_npc" sуlo se puede usar en esos scripts.
Pero en el include?? o debo crear un scrip para esto?


Re: ayuda, con bots - Zoutdaxv - 20.02.2010

Quote:
Originally Posted by [SRG
Toxic_Racer ]
Quote:
Originally Posted by Infierno
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! Don't say those things! We, bots, are cool!", name);
    SendChat(string);
  }
  return 1;
}
Йsto va en el script del npc, "a_npc" sуlo se puede usar en esos scripts.
Pero en el include?? o debo crear un scrip para esto?
Cada bot tiene su propio script, y se ponen en la carpeta "npcmodes", busca la carpeta ahн hay unos ejemplos; aunque puedes usar el mismo script para dos bots.


Re: ayuda, con bots - [SRG]Toxic_Racer - 20.02.2010

Quote:
Originally Posted by Infierno
Quote:
Originally Posted by [SRG
Toxic_Racer ]
Quote:
Originally Posted by Infierno
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! Don't say those things! We, bots, are cool!", name);
    SendChat(string);
  }
  return 1;
}
Йsto va en el script del npc, "a_npc" sуlo se puede usar en esos scripts.
Pero en el include?? o debo crear un scrip para esto?
Cada bot tiene su propio script, y se ponen en la carpeta "npcmodes", busca la carpeta ahн hay unos ejemplos; aunque puedes usar el mismo script para dos bots.
Joder amigo, eres impresionante!!!! ya el bot me responde lo que le pregunto ::, pero ahora me puedes ayudar a que cuando yo le diga que al haga algo, el lo haga?


Re: ayuda, con bots - D[4]rkNet - 20.02.2010

Waw me podriais dar un FS de eso traducido!! esta wapo, luego yo le puedo agregar cosas


Respuesta: ayuda, con bots - vangel - 04.11.2010

Otro ejemplo podria ser con la opcion : SetPlayerChatBubble y saldria un texto sobre el seria algo asi:

public OnPlayerText(playerid, text[])
{
if (strfind(text, "stupid bot") != -1)
{
SetPlayerChatBubble(playerid,"Hey %s! Don't say those things! We, bots, are cool",0xFFFFFFAA,50,5000);
}
return 1;
}


Re: ayuda, con bots - SuperMarioRol - 04.11.2010

usa [pawn ] [ /pawn] sin los epsacios, profavor