Jump to content

samp cars to mta


Recommended Posts

hi i put this cars of sa:mp in mta but doesn´t work.

AddStaticVehicle(411,-2323.5581,-1682.5283,482.1984,302.9525,8,0); // infernus 1

AddStaticVehicle(411,-2326.5210,-1679.4867,482.4064,303.0328,14,0); // infernus 2

AddStaticVehicle(411,-2328.7996,-1676.5475,482.5283,299.0234,13,6); // infernus 3

TO

createVehicle(411,-2323.5581,-1682.5283,482.1984,302.9525,8,0); -- infernus 1

createVehicle(411,-2326.5210,-1679.4867,482.4064,303.0328,14,0); -- infernus 2

createVehicle(411,-2328.7996,-1676.5475,482.5283,299.0234,13,6); -- infernus 3

what is wrong?

any samp cars to mta converter like mta map converter?

bye

Link to comment
also note dont use ; after each function in LUA

You can close your lines in LUA with a ";" if you want, its no big deal, the interpreter will just ignore them.

You don't actually need to do so in SA-MP either, the compiler will spit out warnings if you don't close your lines, however the script will still compile fine.

Tbh, its just personal preference if you use a ";" to close your lines or not.

Link to comment

Maps are more efficient - less bandwidth and faster. They're also able to be edited by editors (including our soon-to-be-released editor) by people who have no scripting experience. Please use them!

Link to comment
Maps are more efficient - less bandwidth and faster. They're also able to be edited by editors (including our soon-to-be-released editor) by people who have no scripting experience. Please use them!

But with to much vehicles and the Z is +1 above the ground the vehicles will float in the air.

Link to comment
Maps are more efficient - less bandwidth and faster. They're also able to be edited by editors (including our soon-to-be-released editor) by people who have no scripting experience. Please use them!

But with to much vehicles and the Z is +1 above the ground the vehicles will float in the air.

No it will not. The gravity will take care of that!

Only what happened is that the cars can blow or have damage.

Link to comment
Maps are more efficient - less bandwidth and faster. They're also able to be edited by editors (including our soon-to-be-released editor) by people who have no scripting experience. Please use them!

But with to much vehicles and the Z is +1 above the ground the vehicles will float in the air.

No it will not. The gravity will take care of that!

Only what happened is that the cars can blow or have damage.

It happends on a server were I made a vehicle map for it.

Link to comment
And you better use a .map

any samp cars to .map converter???

i can give you filterscipt,

u can add vehicles to this FS,

compile it, and run as fs.

then go to your scriptfiles, you will get MTA.map file with vehicles.

im not creator of this FS.

// Luby's SA-MP to MTA Converter 2.0v © 2008 
// GTAMScripting.info 
  
// To use : Paste your code in ToSave function, compile it and run as gamemode 
  
#include <file> 
#include <float> 
#include <string> 
  
native format(output[], len, const format[], {Float,_}:...); 
  
// Change this three lines <<<<<<<<< 
#define MAP_NAME "MTA.map" 
  
#define YOU "Reamis" 
  
#define YOUR_MOD "Masinos" 
// And leave others <<<<<<<<<< 
  
main(){} 
native print(str[]); 
forward OnGameModeInit(); 
public OnGameModeInit(){ 
fremove(MAP_NAME); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, "<map mod=\""YOUR_MOD"\" author=\""YOU"\" version=\"1.0\">\r\n"); 
fclose(fhandle); 
print("Please wait ..."); 
if(ToSave()){ 
print("Done!"); 
new File:fhandle2; 
fhandle2 = fopen(MAP_NAME, io_append); 
fwrite(fhandle2, "</map>"); 
fclose(fhandle2); 
} 
return 1; 
} 
  
ToSave(){ 
//vehicles 
  
AddStaticVehicle(400,-2028.4436,125.2684,29.1714,0.6024,123,1); // landstalker SF 
  
//end 
return 1; 
} 
  
stock CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ){ 
new str[256]; 
format(str,256,"<object model=\"%d\" posX=\"%f\" posY=\"%f\" posZ=\"%f\" rotX=\"%f\" rotY=\"%f\" rotZ=\"%f\" /> <!-- Objektai is Sa-Mp \r\n",modelid, X, Y, Z, rX, rY, rZ); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, str); 
fclose(fhandle); 
return true; 
} 
  
stock AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2){ 
new str[256]; 
format(str,256,"<vehicle model=\"%d\" posX=\"%f\" posY=\"%f\" posZ=\"%f\" rotX=\"0.0\" rotY=\"0.0\" rotZ=\"%f\" color=\"%d %d 0 0\"/> <!-- Masinos is Sa-Mp --> \r\n",modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, str); 
fclose(fhandle); 
return true; 
} 
  
stock AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay){ 
#pragma unused color1 
#pragma unused color2 
#pragma unused respawn_delay 
new str[256]; 
format(str,256,"<vehicle model=\"%d\" posX=\"%f\" posY=\"%f\" posZ=\"%f\" rotX=\"0.0\" rotY=\"0.0\" rotZ=\"%f\" color=\"%d %d 0 0\"/> <!-- Masinos is Sa-Mp --> \r\n",modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, str); 
fclose(fhandle); 
return true; 
} 

Link to comment
And you better use a .map

any samp cars to .map converter???

i can give you filterscipt,

u can add vehicles to this FS,

compile it, and run as fs.

then go to your scriptfiles, you will get MTA.map file with vehicles.

im not creator of this FS.

// Luby's SA-MP to MTA Converter 2.0v © 2008 
// GTAMScripting.info 
  
// To use : Paste your code in ToSave function, compile it and run as gamemode 
  
#include <file> 
#include <float> 
#include <string> 
  
native format(output[], len, const format[], {Float,_}:...); 
  
// Change this three lines <<<<<<<<< 
#define MAP_NAME "MTA.map" 
  
#define YOU "Reamis" 
  
#define YOUR_MOD "Masinos" 
// And leave others <<<<<<<<<< 
  
main(){} 
native print(str[]); 
forward OnGameModeInit(); 
public OnGameModeInit(){ 
fremove(MAP_NAME); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, "<map mod=\""YOUR_MOD"\" author=\""YOU"\" version=\"1.0\">\r\n"); 
fclose(fhandle); 
print("Please wait ..."); 
if(ToSave()){ 
print("Done!"); 
new File:fhandle2; 
fhandle2 = fopen(MAP_NAME, io_append); 
fwrite(fhandle2, "</map>"); 
fclose(fhandle2); 
} 
return 1; 
} 
  
ToSave(){ 
//vehicles 
  
AddStaticVehicle(400,-2028.4436,125.2684,29.1714,0.6024,123,1); // landstalker SF 
  
//end 
return 1; 
} 
  
stock CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ){ 
new str[256]; 
format(str,256,"<object model=\"%d\" posX=\"%f\" posY=\"%f\" posZ=\"%f\" rotX=\"%f\" rotY=\"%f\" rotZ=\"%f\" /> <!-- Objektai is Sa-Mp \r\n",modelid, X, Y, Z, rX, rY, rZ); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, str); 
fclose(fhandle); 
return true; 
} 
  
stock AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2){ 
new str[256]; 
format(str,256,"<vehicle model=\"%d\" posX=\"%f\" posY=\"%f\" posZ=\"%f\" rotX=\"0.0\" rotY=\"0.0\" rotZ=\"%f\" color=\"%d %d 0 0\"/> <!-- Masinos is Sa-Mp --> \r\n",modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, str); 
fclose(fhandle); 
return true; 
} 
  
stock AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay){ 
#pragma unused color1 
#pragma unused color2 
#pragma unused respawn_delay 
new str[256]; 
format(str,256,"<vehicle model=\"%d\" posX=\"%f\" posY=\"%f\" posZ=\"%f\" rotX=\"0.0\" rotY=\"0.0\" rotZ=\"%f\" color=\"%d %d 0 0\"/> <!-- Masinos is Sa-Mp --> \r\n",modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2); 
new File:fhandle; 
fhandle = fopen(MAP_NAME, io_append); 
fwrite(fhandle, str); 
fclose(fhandle); 
return true; 
} 

wow thanks man ;D

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...