Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to respawn loot without restarting your server

Newbie Spellweaver
Joined
Jan 11, 2009
Messages
12
Reaction score
0
Hi, this is my first thread in this forum..
Thanks to all of you for sharing knowledge and helping people to make work their own servers..

I don't know if for this is needed to create a thread, if it isn't please let me know.

Ok, this is what happened to me, I have a server v0.53 and it loot tents, but when I restart my server to respawn the loot I lose my tent because persistance isn't working yet, so, I thought and look for info to make the loot respawn, so I wouldn't have to restart the server and the tents would still be there :)

This is what I did


Open init.sqf file and looked for this lines

Code:
//STANDART SPAWN
_position = [7500,7500,0];
//exportProxies [_position,200000];
importProxies;
diag_log "SPAWN: START spawnLoot";
spawnLoot [_position,30000,11000];
diag_log "SPAWN: END spawnLoot";
sleep 1;


I deleted this lines

Code:
diag_log "SPAWN: START spawnLoot";
spawnLoot [_position,30000,11000];
diag_log "SPAWN: END spawnLoot";
sleep 1;

And went to the end of the file and added a few lines before diag_log "===== SERVER: END (mission)\init";

The end of my init.sqf look like this

Code:
setTimeForScripts 0.03;

_counter = 0;

while {_counter < 1} do
{
	diag_log "SPAWN: START spawnLoot";
	spawnLoot [_position,30000,11000];
	diag_log "SPAWN: END spawnLoot";
	sleep 10800;
	_counter = 0;
};

diag_log "===== SERVER: END (mission)\init";
 
Newbie Spellweaver
Joined
Oct 24, 2014
Messages
22
Reaction score
0
thx,it works,but the server lag when the spwan loot start,i change the 10800 to 1800,because my server auto restart in 10800 sec,so,can you fix this?
 
Newbie Spellweaver
Joined
Jan 11, 2009
Messages
12
Reaction score
0
I'm sorry, I'm not very good at scripting, maybe it's not the best way to make the loot respawn..
Or maybe would it be better to edit the server exe, I don't know at all.. Sorry my friend, hopefully somebody here can explain us why the lag.

Greetings!
 
Newbie Spellweaver
Joined
Feb 2, 2014
Messages
30
Reaction score
5
if you dont want your server to lag every 1800 sec, dont respawn loot every 1800 sec, or lower the loot amount on respawn
otherwise get used to freezes
+ The more loot there is, the lower server FPS you have. <10 fps = noticable lags
 
Back
Top