Jump to content

Luby's SA-MP to MTA Converter


Guest Luby

Recommended Posts

Hello all :D

I want to show you my converter which converts pawn vehicles and objects to lua vehicles and objects :D

Just put your vehicles and objects in ToSave function, compile in pawno from sa-mp and run as gamemode in samp. Done :D Newly generated map will show in scriptfiles :D Put saved info in resource start event and go play with new things!

You can also change name of file to save and text showed at vehicles plates

Just change this lines :

#define MAP_NAME "MTA.txt" 
#define PLATES "By Luby" 

Link to old script : http://pastebin.com/f6c3b0d11

Link to NEW version : http://pastebin.com/f4a00bd99

Changes in 2.0 :

* Now, it will save .map file.

* You can change author and name of map. Just change it :

#define YOU "You" 
#define YOUR_MOD "MOD" 

Regards,

Luby :wink:

Edited by Guest
Link to comment

I added AddPlayerClass(), I know their isn't anything like "OnGamemodeInit" like in SA-MP but it does come in useful in some areas

stock AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, w1, a1, w2, a2, w3, a3){ 
    #pragma unused a1 
    #pragma unused w1 
    #pragma unused w2 
    #pragma unused a2 
    #pragma unused w3 
    #pragma unused a3 
    new str[256]; 
    format(str,256,"spawnPlayer(source,%f,%f,%f,%f,%d)\r\n", spawn_x, spawn_y, spawn_z, z_angle, modelid); 
    new File:fhandle; 
    fhandle = fopen(MAP_NAME, io_append); 
    fwrite(fhandle, str); 
    fclose(fhandle); 
    return true; 
} 

I hope you don't mind Luby.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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