SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 12/02/2018, 10:20 PM   #1
Graber
Banned
 
Join Date: Mar 2013
Location: Germany
Posts: 108
Reputation: 147
Default IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

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!

Last edited by Graber; 22/04/2018 at 09:50 AM. Reason: thread deprecated
Graber is offline   Reply With Quote
Old 12/02/2018, 10:31 PM   #2
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,847
Reputation: 1312
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

That is a very clever use of Pawn.Raknet.
Pottus is offline   Reply With Quote
Old 12/02/2018, 10:33 PM   #3
RIDE2DAY
Huge Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Modena, Italy
Posts: 211
Reputation: 381
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

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.
RIDE2DAY is offline   Reply With Quote
Old 13/02/2018, 12:36 AM   #4
HeroDR22
Little Clucker
 
HeroDR22's Avatar
 
Join Date: Jan 2018
Posts: 34
Reputation: 20
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

Good job
But i don't think if this against the rules.
__________________
REP ME AND I WILL REP YOU
HeroDR22 is offline   Reply With Quote
Old 13/02/2018, 01:21 AM   #5
solstice_
Gangsta
 
solstice_'s Avatar
 
Join Date: Feb 2016
Location: basement
Posts: 541
Reputation: 68
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

good job
solstice_ is offline   Reply With Quote
Old 13/02/2018, 03:17 AM   #6
Jelly23
Guest
 
Posts: n/a
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

Quote:
Originally Posted by HeroDR22 View Post
Good job
But i don't think if this against the rules.
Why would it be?

Nicely done, +rep.
  Reply With Quote
Old 14/02/2018, 04:22 PM   #7
ZiGGi
Banned
 
Join Date: Sep 2008
Location: Russia
Posts: 1,659
Reputation: 356
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

Interesting, I like it.
ZiGGi is offline   Reply With Quote
Old 14/02/2018, 04:25 PM   #8
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,179
Reputation: 404
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

That was not expected, great job i'm going to test this right now might be a save!
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link
RogueDrifter is offline   Reply With Quote
Old 14/02/2018, 09:49 PM   #9
Romz
Banned
 
Join Date: Jun 2013
Location: Ukraine
Posts: 1,044
Reputation: 64
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

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)
Romz is offline   Reply With Quote
Old 15/02/2018, 03:18 AM   #10
][Noname][
Gangsta
 
][Noname]['s Avatar
 
Join Date: Dec 2010
Posts: 632
Reputation: 92
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

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?
__________________
Owner of Absolute Play and SAMP Addon
][Noname][ is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
my server keep flooding incoming connections and players always losing connections misho1 Server Support 6 19/08/2014 06:10 AM
IP connections: audriuxxx Scripting Help 4 17/03/2013 03:33 PM
[HELP!] Connections Movado Scripting Help 6 21/03/2012 09:20 AM
AD-HOC Connections aRoach Everything and Nothing 0 13/10/2011 06:38 PM
MySQL connections - To use one or to use two connections? Luka P. Scripting Help 2 30/08/2011 06:23 AM


All times are GMT. The time now is 10:25 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.