Skip to content

Commit 2567f32

Browse files
authored
Update README.md
1 parent 4645670 commit 2567f32

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public OnPlayerConnect(playerid)
1414
```
1515
1616
```python
17-
from pysamp import *
17+
from samp import *
1818
1919
def OnPlayerConnect(playerid):
2020
name = GetPlayerName(playerid, Const('MAX_PLAYER_NAME'))
@@ -24,9 +24,22 @@ def OnPlayerConnect(playerid):
2424

2525
As you can see, all referenced return values are removed and instead the method returns either a value or a tuple.
2626
The corresponding python gamemode has to be saved as `gamemode.py` in a `python/` subfolder of your server directory.
27+
By the way, I imported the `samp` module here, which is actually a python module. You can find it in `gamemodes/empty/`.
28+
It wraps the SA-MP functions and handles the encoding and decoding of strings, so you don't have to bother.
29+
*Caution:* with this module, you also get the decode method. Use it to decode the bytestrings as seen in the example gamemode in `gamemodes/empty/`.
30+
2731

2832
# Using
2933
Make sure, that you installed the 32-bit Python 3.5m version on your server!
34+
For debian and ubuntu, this should work:
35+
```bash
36+
sudo dpkg --add-architecture i386
37+
sudo apt-get update
38+
```
39+
and then:
40+
```bash
41+
sudo apt install python3-dev:i386
42+
```
3043

3144
# Compiling
3245
If the uploaded binaries don't suite your needs, you might have to compile the project on your own.

0 commit comments

Comments
 (0)