SA-MP Forums Archive
PUBG like plane, parachuting in. - 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: PUBG like plane, parachuting in. (/showthread.php?tid=661449)



PUBG like plane, parachuting in. - Kontrol - 04.12.2018

Hello so ive created something similar to PUBG. spawn in the lobby after a period of time the game will start. you will then be teleported to the plane (everyone in the lobby)

it works perfectly when I test. but with other players it spazzes out and crashes the server. any ideas?


https://pastebin.com/YcSPbAcJ


Re: PUBG like plane, parachuting in. - GTLS - 06.12.2018

Show server log.


Re: PUBG like plane, parachuting in. - Kontrol - 08.12.2018

sure

Код:
----------------------------------
San Andreas Battlegrounds   -v1
----------------------------------

Number of vehicle models: 1
[connection] 197.226.61.148:57425 requests connection cookie.
[connection] incoming connection: 197.226.61.148:57425 id: 0
[join] AjaxM has joined the server (0:197.226.61.148)
[npc:join] NPCSafeZone1 has joined the server (9:127.0.0.1)
OnPlayerDisconnect has been called.
[npc:part] NPCSafeZone1 has left the server (9:0)
Safzone updated. updating everyones safezone now.
Safzone updated. updating everyones safezone now.
OnPlayerDisconnect has been called.



Re: PUBG like plane, parachuting in. - m4karow - 08.12.2018

Use crashdetect. If you need help, read this: https://sampforum.blast.hk/showthread.php?tid=628754


Re: PUBG like plane, parachuting in. - Kontrol - 09.12.2018

Okay so it doesn't crash the server.

It sets everyone to spectate the vehicle
but instead of the plane flying to where it should. it falls out the sky?
it then hits the floor and you spectate 0,0,0

Any ideas?


Re: PUBG like plane, parachuting in. - Kontrol - 10.12.2018

Ive re-wrote my gamemode I still cant find the issue..

https://pastebin.com/YcSPbAcJ


Re: PUBG like plane, parachuting in. - NaS - 10.12.2018

Quote:
Originally Posted by Kontrol
Посмотреть сообщение
Okay so it doesn't crash the server.

It sets everyone to spectate the vehicle
but instead of the plane flying to where it should. it falls out the sky?
it then hits the floor and you spectate 0,0,0

Any ideas?
That's a problem with FCNPC. Sometimes when they stream in (teleport, spectating, puplayerinvehicle etc), they stop syncing for a few seconds and resume after that.
When this happens the plane will fall out of sync bounds and despawn for your client, which will also stop spectating.

You could try toggling spectate on again after a few seconds. Or make sure the NPC is streamed in before spectating.


Re: PUBG like plane, parachuting in. - Kontrol - 10.12.2018

Quote:
Originally Posted by NaS
Посмотреть сообщение
That's a problem with FCNPC. Sometimes when they stream in (teleport, spectating, puplayerinvehicle etc), they stop syncing for a few seconds and resume after that.
When this happens the plane will fall out of sync bounds and despawn for your client, which will also stop spectating.

You could try toggling spectate on again after a few seconds. Or make sure the NPC is streamed in before spectating.
Okay great, thanks for that much appreciated. Ill try create the plane first, then stick a timer on before they spectate. see if that helps