SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > 0.3.7-DL RC Scripting

Closed Thread
 
Thread Tools Display Modes
Old 04/11/2017, 09:10 AM   #1
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Location: 846
Posts: 851
Reputation: 2585
Default SA-MP 0.3.8 RC (cancelled -> 0.3.7-DL)


SA-MP 0.3.8 RC

Note: This version has been cancelled and is no longer in development. Please see this thread for more information.

--------------------------------------------------

The 0.3.8 version of SA-MP will feature server-side custom models. Right now custom objects and custom player skins are supported, with more types planned for the future. Since this feature potentially has a large scope for some servers, 0.3.8 is being placed in to RC early. This gives server owners plenty of time to plan. These new features will take some time to formalise, so be please be patient with the release.

Although there are several new security features related to custom models, these are not yet enabled in the current build. Only use the RC version on servers you trust as there could be unknown security flaws in GTA:SA's model formats.

Updates:

SA-MP 0.3.8 RC4-4 Client update (optional)

- The RC4-4 client is the same as RC4-3, although removes the "Server timer wrapped" message which was being triggered incorrectly. After some testing, I found there were no ill effects in game from the timer wrapping.

SA-MP 0.3.8 RC4-3 Client update (optional)

- Actors won't do the 'hands up' action when aimed at.
- Limits the game timer some more to fix camera interpolation bugs, although increases the risk of a timer wrap.
- You should be able to use downloaded txds as textdraw sprites using the tag mdl-ID:texturename. Where '-ID' is a model added with AddSimpleModel.
The textdraw system is likely to be upgraded in future RCs, having features similar to MaterialText, so I'd recommend against using downloaded textures for text messages.
- Max client sprite slots increased from 100 to 200.
- More txd validation. The client will not accept textures with a width or height > 2048 pixels.
- Vehicle exiting should work properly on server created objects.

SA-MP 0.3.8 RC4-2 Client update

- When loading a '2D Effect' from downloaded model, the client will only load lights and escalators. All the game's particles are already available in SA-MP as seperate objects.

SA-MP 0.3.8 RC4-1 Client/Server update (optional)

- Client will show a HTTP error instead of 'bad checksum' when downloading from a broken URL.
- Fixes server bug: If RedirectDownload() was called along with script returning 1 in OnPlayerRequestDownload, the client would not know which download method to use.
- When SetSpawnInfo is used with a custom skin, the custom skin won't be reset to 0.

SA-MP 0.3.8 RC4 Client/Server update

- Adds support for URL redirection for model/texture downloads, which means you can host downloads on a web server instead of sending them through the SA-MP server. Client URL downloading is done via libcurl version 7.57.0 compiled with support for http, https, and zlib (gzip).
- If you require a proxy server to download over http, a proxy address can be entered in the Tools > Settings dialog of the SA-MP server browser.
- Adds various pawn functions to deal with download redirection. See the dl_redirect.pwn filterscript for more information.
- Adds GetPlayerCustomSkin() function.
When SetPlayerSkin is used to set a custom skin (downloaded from the server), GetPlayerSkin returns the base skin (from the game), not the custom skin ID. Instead you must use GetPlayerCustomSkin to get the custom skin ID. The SA-MP client and server assume that downloads could fail, or that custom models may fail to load, in which case the base skin used in AddCharModel() is still the main skin.

Code:
forward OnPlayerRequestDownload(playerid, type, crc); // called when the player requests a download
Code:
native FindModelFileNameFromCRC(crc, retstr[], retstr_size);
native FindTextureFileNameFromCRC(crc, retstr[], retstr_size);
native RedirectDownload(playerid, url[]);
Code:
native GetPlayerCustomSkin(playerid);
SA-MP 0.3.8 RC3-4 Client update

- "FreeTXDs" was removed from the F5 screen as it was crashing some players.

SA-MP 0.3.8 RC3-3 Client update

- More dff/txd validation.

SA-MP 0.3.8 RC3-2 Client update

- The custom model unloading code added in RC3 is causing crashes for some people and has been disabled for now.

SA-MP 0.3.8 RC3-1 Client update

- The dff reader couldn't read the Skin extension on some skins.

SA-MP 0.3.8 RC3 Client/Server update

- Adds the first layer of security checks for model/texture file downloads. More security features will be added as the 0.3.8 RC period progresses. For now, only join servers where you trust the server owner.
- You can now change the location of the model cache folder using the Tools > Settings menu in the SA-MP server browser.
- Objects created from models downloaded from the server are now freed from memory after they are deleted.
- Adds data compression to file downloads. Note: Downloads with thousands of small files can still be slow.

SA-MP 0.3.8 RC2 Client/Server update

- MAX_OBJECTS increased to 2000.
- Fixes sniper hud was not drawing correctly.
- In RC1, SelectObject was showing debug collision information and would crash if the information was unavailable.
- Fixes invalid ped model crash that effected some 0.3.8 RC1 players
- Adds 'local' cache concept to avoid having to download large numbers of models in game. This feature is not finalized. More on this later.
- In RC1, streaming might have been broken if you teleported from one vworld in to the same vworld.

- Adds support for timed objects in custom models.
- AddCharModel/AddSimpleModel can now be called from pawn. There are currently no restrictions on when you can call these functions, but be aware that if you do not call them inside OnFilterScriptInit/OnGameModeInit, you run the risk that some players, who are already on the server, may not have downloaded the models.

Code:
native AddCharModel(baseid, newid, dffname[], txdname[]);
native AddSimpleModel(virtualworld, baseid, newid, dffname[], txdname[]);
native AddSimpleModelTimed(virtualworld, baseid, newid, dffname[], txdname[], timeon, timeoff);

How custom models work in SA-MP

Custom models are stored with the SA-MP server, usually in the 'models' folder. When a player connects, they are given a list of all models used by the server. Players will download models as required and store them by CRC in a 'cache' folder. Every server the player connects to has a seperate model cache. The local cache is located under: Documents\GTA San Andreas User Files\SAMP\cache followed by the server's IP.Port.

For custom player skins, the player will download all of these at the start of the game, since the game can't be paused to load skins. For objects attached to the player like accessories, these must be downloaded at the start also. For world objects, these will be downloaded depending what virtual world they are in. That means it's possible to have custom worlds that the player would not have to download until they entered the virtual world.

Model format

The skin format is the same as the game's normal format. Object models require a collision attached to the dff, and this collision has to be attached using the kdff tool.

The main modeling tools for GTA:SA are written for 3dsmax, although there are some other tools available for blender. I have made a short blender export tutorial available here.

Defining custom models in the artconfig.txt file

Custom models are currently defined in the server's artconfig.txt file. The line AddCharModel is used to add a new player model, and AddSimpleModel is used to define a custom object, which includes both world objects and objects that will be attached to players as accessories.

Quote:
Player skins use ranges: 20000 to 30000 (10000 slots)
Objects use negative IDs: -1000 to -30000 (29000 slots)
Other fixes since 0.3.7

- The radar outline should now scale properly in widescreen resolutions.
- A bug introduced to PlayerPlaySound with sound ID 0 should be fixed.
- Actors should now be able to rotate again.

Downloads:

0.3.8 RC4 Client
SA-MP 0.3.8 RC4-4 Client Installer
SA-MP 0.3.8 RC4-3 Client Installer

0.3.8 RC4 Server
SA-MP 0.3.8 RC4-1 Windows Server
SA-MP 0.3.8 RC4-1 Linux Server

0.3.8 RC3 Client
SA-MP 0.3.8 RC3-4 Client Installer
SA-MP 0.3.8 RC3-3 Client Installer

0.3.8 RC3 Server
SA-MP 0.3.8 RC3 Windows Server
SA-MP 0.3.8 RC3 Linux Server

0.3.8 RC2 Client
SA-MP 0.3.8 RC2 Client Installer

0.3.8 RC2 Server
SA-MP 0.3.8 RC2 Windows Server

0.3.8 RC1 Client
SA-MP 0.3.8 RC1 Client Installer

0.3.8 RC1 Server
SA-MP 0.3.8 RC1 Windows Server

Last edited by Kalcor; 13/01/2018 at 10:15 PM.
Kalcor is offline  
Old 04/11/2017, 12:26 PM   #2
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Posts: 621
Reputation: 84
Default Re: SA-MP 0.3.8 RC

Great job, Kye. Thank you.
cuber is offline  
Old 04/11/2017, 12:28 PM   #3
Widoh
Little Clucker
 
Join Date: Oct 2017
Posts: 22
Reputation: 3
Default Re: SA-MP 0.3.8 RC

yaaaaay
Widoh is offline  
Old 04/11/2017, 12:30 PM   #4
DonaldDuck
Huge Clucker
 
DonaldDuck's Avatar
 
Join Date: Jun 2017
Location: Tandag City, Philippines
Posts: 326
Reputation: 52
Default Re: SA-MP 0.3.8 RC

OMGGG! 0.3.8 is here! thank you so much kye!
__________________
County Island Roleplay A Whole New World
Click Me To Watch The Video

Philippines Roleplay
Dynamic Backpack System | Dynamic Land System | Dynamic House and Furniture System and much more!
DonaldDuck is offline  
Old 04/11/2017, 12:30 PM   #5
Codeah
Big Clucker
 
Codeah's Avatar
 
Join Date: Jun 2016
Location: The Netherlands
Posts: 82
Reputation: 48
Default Re: SA-MP 0.3.8 RC

Nice! Have been waiting for an update for ages!
__________________
Codeah is offline  
Old 04/11/2017, 12:30 PM   #6
BiosMarcel
High-roller
 
BiosMarcel's Avatar
 
Join Date: Jul 2012
Location: Germany
Posts: 1,236
Reputation: 205
Default Re: SA-MP 0.3.8 RC

Nice man, one of the features everyone waited for i'd say
BiosMarcel is offline  
Old 04/11/2017, 12:30 PM   #7
Ponga
Big Clucker
 
Ponga's Avatar
 
Join Date: Oct 2017
Posts: 94
Reputation: 6
Default Re: SA-MP 0.3.8 RC

After how many years 0.3.8 is now here. Great job SA-MP Team.
__________________
Ponga is offline  
Old 04/11/2017, 12:31 PM   #8
Unrea1
Gangsta
 
Unrea1's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 846
Reputation: 104
Default Re: SA-MP 0.3.8 RC

YYYYYYYYYYYYYYYYYYYEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAA AAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HHHHHHHHHHHHHHHHHHHHHHHHHH
Unrea1 is offline  
Old 04/11/2017, 12:32 PM   #9
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Posts: 621
Reputation: 84
Default Re: SA-MP 0.3.8 RC

Quote:
Originally Posted by Ponga View Post
After how many years 0.3.8 is now here. Great job SA-MP Team.
Dude, the latest update was on 2017, wtf are you talking about?
cuber is offline  
Old 04/11/2017, 12:32 PM   #10
AndreiWow
High-roller
 
AndreiWow's Avatar
 
Join Date: Nov 2014
Location: Romania, Bucharest
Posts: 1,029
Reputation: 39
Default Re: SA-MP 0.3.8 RC

oh my god
AndreiWow is offline  
Closed Thread

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
Current Map? Rudy_ Scripting Help 2 30/09/2014 02:34 PM
How to add Health to current.... TheYoungCapone Scripting Help 7 31/12/2011 08:31 PM


All times are GMT. The time now is 09:41 AM.


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