SA-MP Forums Archive
npc disconnects - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: npc disconnects (/showthread.php?tid=408545)



npc disconnects - ajwar - 18.01.2013

NPC disconnects 5-20 hours after connect. Any suggestions?


Re: npc disconnects - azzerking - 18.01.2013

Is this after a gmx restart or just random?

if its random then im guessing they are being denied access due to inactivity either by the server or your script


Re: npc disconnects - park4bmx - 18.01.2013

if your connecting NPC fast(example: in a loop) at some time and the server will close the connection to the rest as well as it may take them for bots/attacks etc.


Re: npc disconnects - ajwar - 18.01.2013

It disconnects randomly. Is this fast?

OnGameModeInit:

pawn Код:
SetTimer("npcstart",600,false);



Re: npc disconnects - Private200 - 18.01.2013

Do you know the basics of the timer ?

It is "1000 miliseconds" = "1 second" . In pawn language the timer is writed in *Miliseconds* . Calculating that you can go on with 60.000 miliseconds that is equal to 60 seconds or 1 minute .

pawn Код:
SetTimer("message", 1000, false); // Set a timer of 1000 miliseconds (1 second)
Код:
funcname[]	Name of the function to call as a string. Needs to be a public!
interval	Interval in milliseconds.
repeating	Boolean if the timer should occur repeatedly or only once



Re: npc disconnects - ajwar - 18.01.2013

I know that, but " if your connecting NPC fast " 600ms is that fast?

I don't think that's the problem. Any other suggestions?