SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/12/2010, 10:25 AM   #1
leong124
High-roller
 
leong124's Avatar
 
Join Date: Jun 2008
Location: Hong Kong, China
Posts: 1,738
Reputation: 134
Default 0.3c Objects Converter

0.3c Objects Converter


Important
This converter only supports converting objects mapped using my mod (created with some others) which adds SA:MP 0.3c objects to MTA:SA. However, such mods are depreciated and you're suggested to use some other SA:MP map editors like JernejL's and some map editor scripts using 0.3e mapping features. I got no permission to create mods like that anymore.

Converting ordinary objects may cause problems as some of them may be identified as 0.3c objects, due to the way I add 0.3c objects to MTA:SA.

Introduction
This is a converter for 0.3c objects in MTA:SA Map Editor.
Please refer to another tutorial in GamerX Wiki on how to add 0.3c objects to MTA:SA Map Editor:http://forum.gamerxserver.com/showwi...MTA+Map+Editor

Important Notes
It's suggested that you should only convert the objects which is mapped as 0.3c objects.
Since the way 0.3c objects in MTA:SA works, converting original GTA:SA objects could be wrongly recognised as 0.3c objects and their object IDs would be converted wrongly.

If you haven't mapped any 0.3c objects in MTA:SA Map Editor, or you are using some other map editors, you DON'T need this converter.

Also, if you have added 0.3c objects in MTA:SA Map Editor and you want to convert them back to SA-MP PAWN format, you MUST use this converter. Using convertffs/delux converter only will NOT work.

Method 1(Converting from PAWN format)
This method supports most of the PAWN object formats(CreateObject, CreateDynamicObject, etc.).
  1. Paste your PAWN object code with 0.3c objects to a TXT file and save as Source_objects.txt in
    Code:
    (Your_Server)\scriptfiles\
  2. Install sscanf 2.0 plugin by Y_Less:(Click) so that we can use the converter can run correctly.
  3. Paste the converter script in pawno and save as samp0.3c.pwn in
    Code:
    (Your_Server)\filterscript\
    The script is here(Pastebin):(Click)
    Make sure the script is in the filterscript folder of your server that will be run, or it'll not load.
  4. Open your server and type:
    Code:
    loadfs samp0.3c
    You'll see the converter loaded and it converts the objects successfully. The number of objects converted will be shown.
  5. Go to
    Code:
    (Your_Server)\scriptfiles\
    and find Output_objects.txt
  6. That's your code with 0.3c objects! You can change it to your streamer's format or anything you like!

Method 2(Converting from MTA:SA .map file)
This method only works with the MTA:SA .map files.
Since someone asked me for a direct converter, I've made this new method.

This converter supports objects, vehicles, vehicle paintjobs and their number plates that is in MTA:SA format.

How to use it:
  1. Go to
    Code:
    MTA San Andreas\server\mods\deathmatch\resources
    and find the folder of your map(The name are the same to the filename in MTA:SA), and you'll find a .map file inside the folder. The .map file contains your objects in the MTA:SA Map Editor.
  2. Now copy it and paste it to
    Code:
    (Your_Server)\scriptfiles\
    and rename it as source.map
  3. Install sscanf 2.0 plugin by Y_Less:(Click)
  4. Download the script here(Pastebin):(Click)
    Paste the code in pawno, and name it as mta0.3c.pwn and compile it as a filterscript. Make sure the script is in the filterscript folder of your server that will be opened, or it will not load.
  5. Open your server, and type:
    Code:
    loadfs mta0.3c
  6. Objects and vehicles will be converted automatically. The converted script is in
    Code:
    (Your_Server)\scriptfiles\output.txt

FAQs

  1. Q: The script says "Incorrect (object) format".
    A: Probably it is because you have used the wrong script, for example using the MTA version to convert PAWN scripts, or using the PAWN one to convert MTA scripts.
    If you used the correct converter then probably the script has incorrect format.
    If you are using the MTA version of this converter, make sure you are using MTA:SA 1.0.4 or above. Older versions are not supported.
    If you still have problems, you can give me a line of the code that cannot be converted if you don't mind, so I can have a look on it and improve the converter.

  2. Q: The script says "source.map does not found" or "Source_objects.txt does not found".
    A: Make sure you have renamed your file as the above provided name, and put that file to the scriptfiles folder of your server.

  3. Q: I can't load the converter script.
    A: Ensure you have placed the script in filterscript folder, being compiled and you type the command correctly in the server console. Also check if your sscanf plugin is correctly installed and loaded.

  4. Q: I don't know how to add sscanf plugin.
    A: Simply download it, unzip all the files in sscanf.zip and paste them in your server folder. Open server.cfg and find the line with a word "plugins". If you can't find it then add a new line and type it there. Then type "sscanf" like this:
    Code:
    plugins sscanf
    If you have already installed some other plugins, you may do it like this:
    Code:
    plugins SomePlugins sscanf
    Lastly make sure you have installed .NET Framework 3.5 SP1.

  5. Q: Why don't use convertffs?
    A: Since the way that 0.3c objects in MTA:SA Map Editor works, the IDs of 0.3c objects in MTA:SA that is converted are not from 18631 to 19999.
    We need a special script to correct the IDs, which is the reason for this script to be released.

Conclusion
With this converter, you can easily convert your 0.3c objects from MTA:SA Map Editor back to SA-MP, so that it will be convenient for those who use MTA:SA Map Editor to map 0.3c objects.
If you have any questions, and you can't solve it after reading the FAQs, please feel free to ask it here.

Updates
2011-08-12: The string size of the converter for method 1 is increased, so that it fixes wrong file writings and wrong countings.
2011-08-26: Fixes a bug on error message, displaying the wrong ID number.

Credits
  • leong124 - Made this converter.
  • Contributors of 0.3c objects @ MTA:SA - Made the MTA:SA Map Editor to be possible to map 0.3c objects.
  • Contributors of 0.3c objects - Made the great 0.3c objects to improve our gaming in SA-MP.
  • Y_Less - For his great sscanf plugin.
  • Kalcor - Reverting this thread so that all of you can use this converter.

Last edited by leong124; 26/12/2012 at 07:35 PM. Reason: Update the converter for both methods
leong124 is offline   Reply With Quote
Old 06/12/2010, 05:32 PM   #2
[MWR]Blood
High-roller
 
Join Date: Apr 2009
Posts: 2,404
Reputation: 105
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

Hahaaa, now you done a converter too
Thanks man, you're awesome
__________________
[MWR]Blood is offline   Reply With Quote
Old 07/12/2010, 02:03 AM   #3
BLAbla93
Huge Clucker
 
Join Date: Jan 2009
Posts: 225
Reputation: 4
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

what you should do is make it read the .map file and just convert it!
BLAbla93 is offline   Reply With Quote
Old 07/12/2010, 02:08 AM   #4
leong124
High-roller
 
leong124's Avatar
 
Join Date: Jun 2008
Location: Hong Kong, China
Posts: 1,738
Reputation: 134
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

Okay I'll do that if I have time.
leong124 is offline   Reply With Quote
Old 07/12/2010, 05:24 AM   #5
kLx
Huge Clucker
 
kLx's Avatar
 
Join Date: Feb 2008
Posts: 240
Reputation: 6
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

Why so hard? convertffs.com
__________________
Out of bussiness
kLx is offline   Reply With Quote
Old 07/12/2010, 07:51 AM   #6
leong124
High-roller
 
leong124's Avatar
 
Join Date: Jun 2008
Location: Hong Kong, China
Posts: 1,738
Reputation: 134
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

This is because the IDs of 0.3c objects in MTA:SA are not from 18631 to 19999.
We need a special script to correct the IDs.
Refer to this:http://forum.sa-mp.com/showthread.php?t=196205

EDIT:
Now I've added a direct converter(from MTA:SA format to SA:MP 0.3c format)
It also supports converting vehicles and their paintjobs & numberplate.
Enjoy.

If you got bugs on using the direct converter, you may use the old one(MTA:SA format -> Normal CreateObjects format -> Corrected Objects ID format)
leong124 is offline   Reply With Quote
Old 07/12/2010, 01:07 PM   #7
Zh3r0
Godfather
 
Join Date: Mar 2008
Posts: 5,593
Reputation: 381
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

Objects don't seem to convert for me...Same id.
__________________
Zh3r0 is offline   Reply With Quote
Old 07/12/2010, 04:05 PM   #8
[MWR]Blood
High-roller
 
Join Date: Apr 2009
Posts: 2,404
Reputation: 105
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

Quote:
Originally Posted by Zh3r0 View Post
Objects don't seem to convert for me...Same id.
It works for me(the older version without directly converting from .map file)
__________________
[MWR]Blood is offline   Reply With Quote
Old 08/12/2010, 12:26 PM   #9
TheDarkWolf18
Little Clucker
 
Join Date: Jan 2010
Posts: 35
Reputation: 0
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

(New and Old converter) don't work

Sorry but for me, there is no changement, its the same id and i have too these objects will f*** my server, thats sertainly good but for me this don't work, good job else, just need a programm else if the pwn convertisseur is not too good

Bad for me and my server

good continuation and good day
TheDarkWolf18 is offline   Reply With Quote
Old 08/12/2010, 12:34 PM   #10
TheDarkWolf18
Little Clucker
 
Join Date: Jan 2010
Posts: 35
Reputation: 0
Default Re: [TEXT]How to convert 0.3c objects from MTA to SA:mp

i am not critizise, but samp developers have a semi-stupid idea to create SUPER object but not able to use correctly -_-#, i don't understand this. Good object not usable, thats really a problem
TheDarkWolf18 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
Convert Objects KJ1 Help Archive 10 08/07/2010 12:03 PM
How to convert objects to map? gszyclon Server Support 1 07/09/2009 11:03 AM


All times are GMT. The time now is 03:05 AM.


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