Jump to content
Mr. Green Gaming

Location of Mappers - Help/scripts/tools/resources/mods/tutorial


viiNi

Recommended Posts

--- How to make a "TRIALS" map (Script)---

(Special thanks to FFS Team)

 

 

Step 1. Download (this is a blank map with the script).

 

Step 2. You have to open the MTA EDITOR and make your map.

 

Step 2.1. You will see that the map contains only one spawnpoint, you can change the spawn point, follow the steps below.

 

- First choose your place, and put any object.

 

post-12121-0-27739400-1449701678_thumb.p

 

- Copy the position X : For example -> 1736.33203125

 

- Open trials_client.lua and look for these lines.

local posX = 1958.1304931641local posY = nil

post-12121-0-94590000-1449701875_thumb.p

 

- Change local posX for the number that you copied. And save.

 

- Restart your MTA EDITOR.

 

Step 3. Finished.

 

 

Here a video that shows hot it work

 

 

 

QUESTIONS? ASK!

by NITRO: Sorry for my terrible English :\

Edited by viiNi
Link to comment
  • 2 weeks later...

HOW TO ADD SNOW IN YOUR MAP


 


1. Download the attached "MAPS SNOW.zip" file


2. Extract it somewhere (desktop preferable)


3. Put all files in your map's main folder


4. Open your "meta.xml" file and add these lines in the correct places :


 


Between <meta> and <info...> add the following lines-->



<meta>
<file src="direction_image.png" />
<file src="direction_pointer.png" />
<file src="cursor.png" />
<file src="flakes/cartoon_tile.png" />
<file src="flakes/real_tile.png" />
<script src="snow_gui.lua" type="client" />
<script src="snow.lua" type="client" />
<script src="snow_s.lua" />
<export function="updateSnowType" type="client" />
<export function="updateSnowDensity" type="client" />
<export function="updateSnowWindDirection" type="client" />
<export function="updateSnowWindSpeed" type="client" />
<export function="updateSnowflakeSize" type="client" />
<export function="updateSnowJitter" type="client" />
<export function="startSnow" type="client" />
<export function="stopSnow" type="client" />
<export function="setGuiEnabled" type="client" />
<export function="setSnowToggle" type="client" />
<file src="smallnoise3d.dds" type="client" />
<file src="snow_ground.fx" type="client" />
<file src="snow_trees.fx" type="client" />
<file src="snow_naughty_trees.fx" type="client" />
<file src="mta-helper.fx" type="client" />
<info...

I've edited the original resource so that it just adds snow falling and makes textures white. For those who want the extra features of the resource, please go HERE and download original one from mta community. I think my tutorial is enough because I can't see somebody tinkering with /snowsettings while racing. Also /snow (used for on/off effect) will be kind of unfair as some players will play without snow and see objects more clearly than others. In my stripped down version, snow falls and nobody can stop that :)


 


EDIT : For those of you that don't want falling snow but just want white textures, go HERE.


 


Your meta.xml should look like this ->


 


:mr-green:ENJOY!!!


post-16171-0-08105900-1450560351_thumb.p

MAPS SNOW.zip

Edited by MegasXLR
Link to comment

On request of vinii, i'll try to post some tutorials here.

Here it goes.

 

 

Replace textures without using .txd (by using normal shaders with .jpg/.png etc)

 

You can use shaders to replace textures, this way you have no need to mess with .txd files, and can easilly change the texture by editing a few lines of code.

In this tutorial we will go over how i add it to maps.

 

Once you have made your map and found a texture you want to replace, jump to step 1. 

 

 

Step 1: Getting the texture's name

 

First of all, you need a way to get texture names. You can achieve this by using the resource "shader_tex_names", wich you can download here. (direct link)

 

Once you have downloaded it, unzip it, put it in your resource folder and while ingame  /refresh and /start shader_tex_names.

 

After that, press num_8 to view the list of visible textures, it should look something like this: post-10262-0-97265000-1450999238_thumb.p

 

If your list is very long, try to position your screen so that there are as least as possible objects in your view.

 

 

To find your texture, navigate the list with num_7 and num_9, the texture you selected will light up in different colors.

I have found the texture for my roads:

post-10262-0-20133200-1450999570_thumb.p

 

 

Now that you've got your texture name, press K to copy it to clipboard, and save it for later.

 

 

Step 2: Adding the script and image to your map

 

I have made a zip file with all the files needed to replace.

replacetexture.zip

 

Unzip the file, within it you will see the example texture, the script and the fx file.

Add these to the root of your map folder.

 

Once you've done that, open your meta.xml and add these lines one line under <meta>

If you have changed your texture image, replace it with "texture.jpg"

    <script src="replacetexture.lua" type="client"></script>    <file src="texture.jpg"/>    <file src="texture.fx" />

If youre using another image, replace it with "texture.jpg".

 

Save your meta.xml file, and open replacetexture.lua.

I have added comments to the script to make it more understandable, but the script is pretty simple.

 

If you are using another image, replace "texture.jpg" with your own image file path, so if your image is called myImage.jpg, replace "texture.jpg" with "myImage.jpg". Don't forget to add the proper path.

 

When you have done these things, restart your map. If you did everything correct the textures should be replaced with your image.

Texture end result:

post-10262-0-89127900-1451002613_thumb.p

 

 

Tips

  • .bmp, .dds, .jpg, .png, and .tga images are supported
  • Take a look here if you want more options on how the texture looks
  • When choosing your image, keep the file size low!
  • You can search online for "seamless textures" to find textures that will look nice
  • If something is not working, try to look for errors with the command /debugscript 3

 

If you have any questions, feel free to ask or PM me.

 

Link to comment

It worked!

 

post-12121-0-05463400-1451009985_thumb.p

 

I needed to change the "replacetexture.lua" right in these lines:

	engineApplyShaderToWorldTexture( shader, "cos_hiwaymid_256" )	engineApplyShaderToWorldTexture( shader, "metal1_128" ) 	engineApplyShaderToWorldTexture( shader, "metalox64" )

Some questions that i think It can help other mappers:

 

Here is where I have to paste the name that I copied right?

 

The resource SHADER_TEX_NAMES It is used only to find the correct name of the objects? Right?

 

What is a .FX file? 

 

Are shaders LOCAL or SERVER?

 

Thanks Kali

Link to comment

It worked!

 

attachicon.gifmta-screen_2015-12-25_00-13-03.png

 

I needed to change the "replacetexture.lua" right in these lines:

	engineApplyShaderToWorldTexture( shader, "cos_hiwaymid_256" )	engineApplyShaderToWorldTexture( shader, "metal1_128" ) 	engineApplyShaderToWorldTexture( shader, "metalox64" )

Some questions that i think It can help other mappers:

 

Here is where I have to paste the name that I copied right?

 

The resource SHADER_TEX_NAMES It is used only to find the correct name of the objects? Right?

 

What is a .FX file? 

 

Are shaders LOCAL or SERVER?

 

Thanks Kali

1. Yes, it's only used to find the right texture names.

2. Yes

3. 4.

 

Correct, correct, FX is a shader file (not Lua) and shaders are completely local

 

 

 

 

 

So what's the benefit of using shaders rather than .txd? I don't think the .txd way is hard at all but will use shaders if positives are good enough to switch to it.

It's more dynamic, and works on any texture (as far as i know), without needing to find the txd file and replace it.

The same method is used for custom paintjobs.

Link to comment
~>> GameOver sound when a Player dies <<~

 

 

This script adds a song to "gameover" when the player dies in a map, it can be used in several different game modes and maps

 

 

It also works in different game modes like DD, SH, RACE, among others.

 

 

 

 

 

 

2º - Extract the file "wasted.lua" and "wasted.mp3" inside the folder of your map

 

 

3º - Open the "meta.xml" file of your map and add the line:

 

 

 
    <script type="client" src="wasted.lua" />
 
    <file src="wasted.mp3" />

 

 

bs3uFPI.png?1

 

 

 

4º - To change the sound of GameOver simply put an mp3 file with the name "wasted.mp3" in place of the old ( preferably a short file with 5 sec, 10 sec, 15 sec max)

 

 

 
 
iolYHxo.png

 

 

 

5º - I'm going to leave here all the Horns of MrGreen for download
 
 

 

 

 

 

Final Result

 

 

 

Edited by NITROX
Link to comment
  • 2 months later...
On 25/12/2015 at 10:29 PM, KaliBwoy said:

On request of vinii, i'll try to post some tutorials here.

Here it goes.

 

 

Replace textures without using .txd (by using normal shaders with .jpg/.png etc)

 

 

Step 2: Adding the script and image to your map

 

I have made a zip file with all the files needed to replace.

replacetexture.zip

 

................................................

Fixed link: replacetexture.zip

Link to comment
6 hours ago, MegasXLR said:

Hey guys, can somebody give me a list with all gta sa billboards ids and similar objects on which i can put custom image? I don't want to use custom objects but just change image which is ontop of the billboard. Thanks in advance :) PS I'll make a map with lotta singers, actors etc on those billboards ;p

Hey, you have to test all of them.
May this link can help you.
 

http://www.gforums.ru/topic/3389-gta-sa-objects-id-list/

 

Edited by viiNi
Link to comment
8 hours ago, viiNi said:

Hey, you have to test all of them.
May this link can help you.
 

http://www.gforums.ru/topic/3389-gta-sa-objects-id-list/

 

 

7 hours ago, Quad_Tube said:

Note sure if this helps too.. I find it a bit easier on the eye due to using  a 15in monitor lol

http://dev.prineside.com/en/gtasa_samp_model_id/category/signs-billboards-and-statues/

Thanks a lot guys, that helped :)

Link to comment
  • 3 weeks later...
~>> Create a server to test your maps with the gamemodes of mrgreen <<~
 

 

1º - Download the folder and Notepad++:

Notepad++: DOWNLOAD

Folder:  DOWNLOAD
 

2º -  Install Notepad++ on your computer and unzip the folder "By #NITRO" somewhere on your computer (preferably the desktop)

 

3º - Open the folder "By #NITRO" and go to: By #NITRO >> server > > mods > > deathmatch

 

bTb8nHQl.png

 

4º - Open the file "acl.xml" using Notepad++

 

3R5GO9Xl.png

 

5º - Search for a line called "<group name="Admin">"

 

6º - There will be another line underneath called "<object name="user.12345"></object>", where it says "12345" you should put a note of user that you want to use as an administrator on your server

Or if you prefer, you can leave this


hWrIaVu.png
 


7º - After you have made your changes, click on the little blue box at the top to save your changes

 

8º - Now you must go in "By #NITRO >> server" and run the program "MTA Server.exe" if he ask for any permission then you must allow 

 

ULrDFVU.png

 

9º - A small dark screen will open on your computer, leave it running, because it is responsible for making the server running on your computer

 

HcabA53.png 

10º - On this screen the server will start to be loaded, this may take a maximum of 5 minutes, when written "Querying MTA master server ... success!" then the be server ready 

 

hiCCnWq.png

 

11º - Now open your MTA and go to the tab "Local / Location" and be it the server, now in between him and wait until all files are loaded 

 

ROA9x0q.png

 

12º - When you're inside the server, press "T" and type /register and then place the username that you wrote in the acl.xml and then put an easy-to-remember password:


EXAMPLE:  /register 12345 ELECTRO

 

Appeared a message saying "You have successfully registered! Username: 'xxxxx', Password: ' xxxxxxx ' (Remember it)"

 

ukmCjFT.png

 

13º - Now click on the button "T" and type /login and then your user name and your password that you just registered: 

EXAMPLE: /login 12345 ELECTRO

 

A message will appear saying "Press 'p' to open your admin panel" and "login: You successfully logged in"
 

1kWvOTK.png

 

14º - Now press "p" and have access to the admin panel

15º - To add your maps, go in the directory "By #NITRO > > server > > mods > > deathmatch > > resources > > [maps]", and add your maps in place

 

B9jQ07a.png

 

16º - Now go to your server and press "T" and type "/refresh"

 

17º - There is a problem that makes the songs on the maps do not touch when the map the race starts, to fix this you must go on: F1 > > Settings > > Sound Settings, and change the volume where it says "Map Music Volume" placing of 90 to 100%

 

U5ApzvF.png

Edited by NITROX
download link fixed
Link to comment
  • 3 months later...

HOW TO ADD CUSTOM CHATBOX TEXT WHEN A PLAYER LIKES/DISLIKES YOUR MAP

So the following script will make players receive a chatbox message when they type /like or /dislike.

Put this code into a rate.lua file :

function like (player)
    outputChatBox("this text shows when a player likes your map",player,255,255,255,true)
end
addCommandHandler ( "like", like )

function dislike (player)
    outputChatBox("and this shows when a player dislikes your map",player,255,255,255,true)
end
addCommandHandler ( "dislike", dislike )

Move the rate.lua file into your map's main folder

Now add this line in your map's meta.xml and save it

<script src="rate.lua" type="server" />

That's it! Now when a player rates your map he'll receive the custom message from the rank.lua file!

Link to comment
  • 2 weeks later...
15 hours ago, MegasXLR said:

HOW TO MAKE SKY HAVE RANDOM FLASHING COLOURS

Put the following into a sky.lua file :


function yo()
setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) )
end
setTimer ( yo, 100, 0 )

You can change the number 100 in last line to whatever you like. 100=100milliseconds, if you want to make colour switching slower put higher number here.

Now to make the above script work, move the created sky.lua to your map's main folder and add this to your meta.xml :


<script src="sky.lua" type="client" />

You're done, you should now see random colours flashing in the sky when you start your map!

 

 

24. Sky changing colors NITRO pg.4

https://mrgreengaming.com/forums/topic/14776-location-of-mappers-helpscriptstoolsresourcesmodstutorial/?page=4

 

I believe it is the same, if you want even has a video of the final result

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...