[Include] IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers
#1

ATTENTION:
This thread is old, for the newer topic which covers up all compatibility please go here.


IsClient03DL
Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers
because I also give a fuck about versioning rules

This allows the server to accept incoming connections from players 0.3.DL-R1 by patching the connection packet's content. You can use the main function, IsClient03DL(playerid) to detect whether the player is using 0.3.DL or using another version. This was necessary since the client version returned by the server is not accurate anymore.

The main purpose of this would be to give informative messages (eg. OnPlayerConnect) when the player enters a server with 0.3.DL and give him an actual informative message about having to download another version to play on this server, instead of "Incorrect Version" which is not very user-friendly.

Warning:
Yes, it is actually possible to spawn the player that uses 0.3.DL, but this include is highly experimental and is not designed for that. All functions regarding skins have their packet contents altered (SetSpawnInfo, AddPlayerClass, SetPlayerSkin, normal players and actors and so on), so while it's actually possible to play alongside 0.3.7 players, it will be very broken and would not give a very good experience. Despite that, this demonstrates that you can actually play along 2 versions without major problems!

It would be possible to fix this with plugins that hook the natives, but I don't know how to do that. If someone is willing to help and has knowledge about hooking SA-MP natives, PM me here or at Discord.

Dependencies: Pawn.Raknet
GitHub Repo: https://github.com/AGraber/IsClient03DL

I want to thank the guys at SA-MP Discord for providing helpful information about the packet stuff about 0.3.DL.

Have fun with it!
Reply
#2

That is a very clever use of Pawn.Raknet.
Reply
#3

Nice trick, good job. You could use a macro for the IsClient03DL function as you're using a global variable there. Otherwise, I'd use a static variable with some safety checks for the playerid parameter to make sure it won't try to access an invalid array index.
Reply
#4

Good job
But i don't think if this against the rules.
Reply
#5

good job
Reply
#6

Quote:
Originally Posted by HeroDR22
Посмотреть сообщение
Good job
But i don't think if this against the rules.
Why would it be?

Nicely done, +rep.
Reply
#7

Interesting, I like it.
Reply
#8

That was not expected, great job i'm going to test this right now might be a save!
Reply
#9

Is it possible to do backward compatibility, that it was possible to come in from 0.3.7 to 0.3.DL?
(Naturally, without loading models)
Reply
#10

as connection DL to 7 exist in client as mod
yes - it's possible to allow connect 7 to DL
but what to do with this players?

send message - please install last ver or you will have bugs on server?
Reply
#11

Quote:
Originally Posted by ][Noname][
Посмотреть сообщение
as connection DL to 7 exist in client as mod
yes - it's possible to allow connect 7 to DL
but what to do with this players?

send message - please install last ver or you will have bugs on server?
You can put the player in a special room, and forbid him to play until the player downloads the DL version.
Reply
#12

Jelly23 says me is possible to allow clients 0.3.7 in 0.3DL, but 0.3DL have news RPCs and 0.3.7 not, and this can crash player.
Reply
#13

it's possible already with this script, only change text ver and iVersion = 4062

but SetPlayerSkin packet - other
it's a reason of crashes
Reply
#14

how to used
Reply
#15

Nice one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)