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
AdrianGraber
Big Clucker
 
Join Date: Mar 2013
Location: Germany
Posts: 83
Reputation: 51
Default IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

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!
AdrianGraber is offline   Reply With Quote
Old 12/02/2018, 10:31 PM   #2
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,313
Reputation: 1186
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: 219
Reputation: 345
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: 22
Reputation: 0
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.
__________________
Looking for scripters
Willing to pay $$$
Contact me if you are interested.
HeroDR22 is offline   Reply With Quote
Old 13/02/2018, 01:21 AM   #5
willbedie
Huge Clucker
 
willbedie's Avatar
 
Join Date: Feb 2016
Location: database/Players
Posts: 235
Reputation: 7
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

good job
__________________


server.untitleddm.com:7777
willbedie is offline   Reply With Quote
Old 13/02/2018, 03:17 AM   #6
Jelly23
Big Clucker
 
Jelly23's Avatar
 
Join Date: Aug 2017
Posts: 121
Reputation: 237
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.
Jelly23 is offline   Reply With Quote
Old 14/02/2018, 04:22 PM   #7
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,700
Reputation: 322
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,054
Reputation: 160
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 RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.
RogueDrifter is offline   Reply With Quote
Old 14/02/2018, 09:49 PM   #9
Romz
Gangsta
 
Romz's Avatar
 
Join Date: Jun 2013
Posts: 986
Reputation: 55
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: 600
Reputation: 72
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 04:01 AM.


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