SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 12/02/2018, 09:20 PM   #1
AdrianGraber
Big Clucker
 
AdrianGraber's Avatar
 
Join Date: Mar 2013
Location: Germany
Posts: 99
Reputation: 102
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 AdrianGraber; 22/04/2018 at 08:50 AM. Reason: thread deprecated
AdrianGraber is offline   Reply With Quote
Old 12/02/2018, 09:31 PM   #2
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,424
Reputation: 1238
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, 09:33 PM   #3
RIDE2DAY
Huge Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Modena, Italy
Posts: 222
Reputation: 375
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 12/02/2018, 11:36 PM   #4
HeroDR22
Little Clucker
 
HeroDR22's Avatar
 
Join Date: Jan 2018
Posts: 37
Reputation: 19
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, 12:21 AM   #5
willbedie
Huge Clucker
 
willbedie's Avatar
 
Join Date: Feb 2016
Location: database/Players
Posts: 217
Reputation: 9
Default Re: IsClient03DL - Allow 0.3.DL-R1 connections to SA-MP 0.3.7 servers

good job
__________________
RETIRED FROM SA-MP.
__________________________


Our server is currently under construction, you may register our forums if you want to know more about it.
The server is going to run on the last SA-MP version, which is 0.3.DL. It has so many features, stay updated on our forums.

FORUM | DISCORD
willbedie is offline   Reply With Quote
Old 13/02/2018, 02: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, 03:22 PM   #7
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,730
Reputation: 350
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, 03:25 PM   #8
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,565
Reputation: 338
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!
__________________
Code:
I'm available to script stuff for cash PM me here or on discord @ Andy[RDZ]#0040
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install||
Array index out of bounds


[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Old 14/02/2018, 08:49 PM   #9
Romz
High-roller
 
Romz's Avatar
 
Join Date: Jun 2013
Location: Ukraine
Posts: 1,041
Reputation: 59
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, 02:18 AM   #10
][Noname][
Gangsta
 
][Noname]['s Avatar
 
Join Date: Dec 2010
Posts: 620
Reputation: 82
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 offline   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 05:10 AM
IP connections: audriuxxx Scripting Help 4 17/03/2013 02:33 PM
[HELP!] Connections Movado Scripting Help 6 21/03/2012 08:20 AM
AD-HOC Connections aRoach Everything and Nothing 0 13/10/2011 05:38 PM
MySQL connections - To use one or to use two connections? Luka P. Scripting Help 2 30/08/2011 05:23 AM


All times are GMT. The time now is 09:36 PM.


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