Skip to content

Known problems with PySAMP

denNorske edited this page Jan 28, 2022 · 6 revisions

1. Toggling spectate mode off causes "Server closed connection":

Related issue: https://github.com/habecker/PySAMP/issues/42

If you use TogglePlayerSpectating(playerid, True) under OnPlayerRequestClass in your gamemode, you may experience that the gamemode will close the connection to the client when you exit spectate mode. We are not sure why this is happening, but it is documented here: If the player is not loaded in before setting the spectate status to false, the connection can be closed unexpectedly.

The current workaround is to call SpawnPlayer(playerid) just before starting spectating mode. This will properly load the player, before the spectate starts, and avoid you getting "closed connection" when you toggle spectate off.

2. Windows python installations need to be installed for all users, on the default path

PySAMP is currently not able to locate the python installation if it is installed on a different path than standard. Therefore, your python 3.9.7 32-bit installation needs to be located in C:\Program Files (x86)\Python39-32. Learn more how to install Python correctly on Windows here.

Clone this wiki locally