[Ayuda] Con NPC -
Andres_Garcia - 28.04.2010
Como puedo ponerle al npc que cuando diga una palabra el me responda o al apretar "Enter" diga algo
Ese es un bot mio
Код:
else if(!strcmp(playername,"Jorge_Ferrer",true)) {
PutPlayerInVehicle(playerid, Random, 0);
SetSpawnInfo( playerid, 0, 185, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
SetPlayerColor(playerid,0x33AA33AA);
}
Re: [Ayuda] Con NPC -
nymphi - 28.04.2010
creo que no se puede, pero lo que si puedes es crear un bot para el chat y que te responda con los comandos que tu quieras
Re: [Ayuda] Con NPC -
RcoN! - 28.04.2010
Quote:
Originally Posted by nymphi
creo que no se puede, pero lo que si puedes es crear un bot para el chat y que te responda con los comandos que tu quieras
|
Por si no sabias los KEYS remplazan el comando
ejecutan una funcion de la misma forma que un comando
y yo creo que se puede
Re: [Ayuda] Con NPC -
Andres_Garcia - 28.04.2010
Miren encontre esto, pero al ponerlo en el FS me tira este error.
Quote:
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;
}
|
Y este es el error que me tira:
Quote:
C:\Documents and Settings\Bluegamez\Escritorio\Los Andes\filterscripts\CityNPCS.pwn(53) : error 017: undefined symbol "SendChat"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
|
Re: [Ayuda] Con NPC -
[SRG]Toxic_Racer - 28.04.2010
Quote:
Originally Posted by Andres_Garcia
Miren encontre esto, pero al ponerlo en el FS me tira este error.
Quote:
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;
}
|
Y este es el error que me tira:
Quote:
C:\Documents and Settings\Bluegamez\Escritorio\Los Andes\filterscripts\CityNPCS.pwn(53) : error 017: undefined symbol "SendChat"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
|
|
ese codigo no va en un fs, va en lo npc modes: por ejemplo, gravastes tu npc con el nombre de bender (xD), bien, ahora tienes que hacer tu npc y creastes el archivo que va en npcmodes no? bueno, en ese archivo que creastes es donde vas a poner el public onplayercommandtext y todos esos codes que acabas de postear
Re: [Ayuda] Con NPC -
Andres_Garcia - 28.04.2010
Ah entiendo...
ahora voy a probar y te aviso, pero ya algo entendi que para agregarle cosas al bot va en la carpeta de npc
Re: [Ayuda] Con NPC -
[SRG]Toxic_Racer - 29.04.2010
Quote:
Originally Posted by Andres_Garcia
Ah entiendo...
ahora voy a probar y te aviso, pero ya algo entendi que para agregarle cosas al bot va en la carpeta de npc 
|
si xD, carpeta de tu server/ npcmodes/ el npc que quieres poner en tu sv xD
Re: [Ayuda] Con NPC -
Andres_Garcia - 29.04.2010
Pro aun no me resulta Dx! no logro aser hablar a bot xd
Re: [Ayuda] Con NPC -
[SRG]Toxic_Racer - 29.04.2010
Quote:
Originally Posted by Andres_Garcia
Pro aun no me resulta Dx! no logro aser hablar a bot xd
|
pero tu npc spawnea?, pasame su npcmode
Re: [Ayuda] Con NPC -
Andres_Garcia - 29.04.2010
Eso esta en mi npcmode
pawn Код:
#define RECORDING "vendedor"
#define RECORDING_TYPE 2 // 1 = si esta en Vehiculos - 2 = si esta Caminando
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
public OnPlayerText(playerid, text[])
{
if (strfind(text, "stupid bot") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SendCommand("/kill");
format(string, sizeof(string), "Hey %s! You are so mean, you make me so sad!", name);
SendChat(string);
}
return 1;
}