Quote from: PSL on Feb 17, 2024, 04:02 AMI found a problem in testing this version. When I hide an NPC's console, the NPC doesn't join the server.This issue has been fixed. It was related to npc creating logfiles. Logfiles can now be found in folder npcscripts/logs whenever ConnectNPC is called with console parameter false.
ConnectNPC("[NPC]Jack","npcplayback.nut",false,"127.0.0.1","rpclib z-finder"); //Not Join
ConnectNPC("[NPC]Jack","npcplayback.nut",true,"127.0.0.1","rpclib z-finder"); //Join
QuoteCorrected API version to 1.6Windows
Quote
- New Recording Type: Introducing PLAYER_RECORDING_TYPE_ALL for StartRecordingPlayerData, eliminating the need to specify whether the player is on foot or in a vehicle.
- Captured Events: PLAYER_RECORDING_TYPE_ALL now supports capturing various events, including player updates, death, pickup events, checkpoint events, object touch/shot events, player chat, player command, private messages, and ClientScriptData.
- StartRecordingAllPlayerData: A unified function to start recording on all players, including those who may join later.
- Server Recording: Similar to StartRecordingAllPlayerData, but produces an hrec file with player join times and corresponding rec files for replay. Connected players act as NPCs, replicating player actions.
- ConnectMultipleNpcs: Connects multiple NPCs from an hrec file produced by PutServerInRecordingMode.
- recdir Configuration: Introduce recdir 2 in server.cfg to save playback recordings to npcscripts/recordings, with recdir 1 as the default.
- Npcs with Strings: Npcs can now be called with strings, allowing for custom actions like "function OnNPCSpawn(){SendChat("I have spawned");}".
- Logfiles: Each NPC now writes logfiles in the npcscripts folder.
- New NPC Functions: Various new functions added for use by npcscripts, including Suicide, SetMyHealth, GetMyHealth, LookAtPos, LookAtPlayer, GetMyClass, RequestClassAbs, AmISpawned, GetMySkin, GetMyTeam, GetMyArmour, SendPrivMsg, SetConfig, GetPlayerColor, IsPlaybackRunning, IsPlaybackPaused, IsServerInRecordingMode.
- Additional npc04relxx Plugin Functions: KickAllNPC, IsPlayerRecording, StartRecordingAllPlayerData, StopRecordingAllPlayerData, PutServerInRecordingMode, StopServerInRecordingMode, IsServerInRecordingMode.
- Configurable max_npc: Added max_npc in server.cfg, optional and limits the number of NPCs in the server (values: 0 to 100, -1 for any number).
- Console Notifications: Npcs now print their names in the console upon connection, e.g., "Connected. ID: 03 Name: John".
- Bug Fixes: Fixed issues with NPC getting kicked, not holding weapons on spawn, and incorrect angles for newly streamed players.
- Private Messages: NPCs can now send private messages.
if (cmd == "reload") {
local loaded = []
foreach (v in getOnlinePlayers())
{
if (getPlayer(v.ID) != null && getPlayer(v.ID).Spawned)
{
loaded.append(getPlayer(v.ID))
}
}
for(local i=0;i<100;i++)
{
local plr=FindPlayer(i);
if(plr)
{
onPlayerPart(plr,1);
}
}
onServerStop();
dofile("main.nut") // your main script.
onScriptLoad()
foreach (b in getOnlinePlayers()) {
onPlayerJoin(getPlayer(b.ID))
}
foreach (plr in loaded) {
onPlayerRequestClass(plr, plr.Class, plr.Team, plr.Skin)
if (plr.IsSpawned) onPlayerSpawn(plr)
}
AnnounceAll("Reloaded.", 0)
return 1;
}
Quote from: Eva on Feb 15, 2024, 04:27 PMStill its a downgrade lol, going back to an earlier release is downgrade not upyes eva, if we count number of version then its correct. if we count quality of version then its upgrade (as quality, at least by needs of topic starter). for example if you swith your PC from Intel Celeron G6900 to Intel Core i7-8700 it will be 'downgrade' because G6900 is newer but i7-8700 has better perfomance (though 5 years older).
Quote from: vitovc on Feb 14, 2024, 04:57 PMStill its a downgrade lol, going back to an earlier release is downgrade not upQuote from: Eva on Feb 14, 2024, 04:13 PMehm thats not upgrade but downgrade, going from 04rel006 to 04rel004.it depends how to count. 6 is more than 4, rel006 has more value of bugs and limitations and rel004 has less value of bugs and limitations... in rel006 you can not use classsicaxis.asi, widescreen.asi is bugged, you can not push players (it considered as 'bug' by devs), you can not look back by middle mouse button in every angle of player with correct turning head... but in rel006 you can edit stadium text and turn on taxi lights... do it depends of personal preference.