[01:25:04] [connection] 127.0.0.1:60343 requests connection cookie. [01:25:04] [connection] 127.0.0.1:60344 requests connection cookie. [01:25:04] [connection] 127.0.0.1:60345 requests connection cookie. [01:25:05] [connection] incoming connection: 127.0.0.1:60343 id: 0 [01:25:05] [connection] incoming connection: 127.0.0.1:60344 id: 1 [01:25:05] [connection] incoming connection: 127.0.0.1:60345 id: 2 [01:25:05] [npc:join] NPC_01 has joined the server (0:127.0.0.1) [01:25:05] [npc:join] NPC_02 has joined the server (1:127.0.0.1) [01:25:05] [npc:join] NPC_03 has joined the server (2:127.0.0.1) [01:25:06] [npc:part] NPC_01 has left the server (0:2) [01:25:06] [npc:part] NPC_02 has left the server (1:2) [01:25:06] [npc:part] NPC_03 has left the server (2:2)
OnGamemodeInit > ConnectNPC("NPC_01", "NPC_01");(ETC CON LOS OTROS)
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new NPC[MAX_PLAYER_NAME];
GetPlayerName(playerid, NPC, sizeof(NPC));
if(!strcmp(NPC, "NPC_01", true))
{
SetPlayerSkin(playerid, 309);
SetPlayerColor(playerid, 0xFFFFFF00);
TogglePlayerControllable(playerid, false);
SetTimerEx("NPC_RegisText", 10000, true, "d", playerid);
Attach3DTextLabelToPlayer(NPC_Registro[2], playerid, 0.0, 0.0, 0.2);
ApplyAnimation(playerid, "ON_LOOKERS", "shout_02", 4.1, 7, 5, 1, 1, 1);
}
return 1;
}
ETC CON LOS OTROS.
return 1;
}
xD
|
alguien mas le quiere decir sobre el maxnpc , no le a quedado claro.
xD |
|
Claro, vamos a aclarбrselo.
En tu server.cfg hay algo llamado maxnpc 0 si esta en 0 asigna le la cantidad de NPCs que piensas ingresar en tu servidor, por ejemplo maxnpc 10 si en dado caso aun asн los sigue expulsando luego de hacer eso, entonces conectalos con un timer cada 2 segundos 1 por 1, son mйtodos, si deseas que tengan ID constantes, entonces cierra el servidor con clave momentбneamente y cuando cargue todos los NPCs quitarle la contraseсa, de esta forma no ingresan jugadores y les asigna ID constante a los NPC. |