capitanazop Posted June 3, 2008 Posted June 3, 2008 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
Winky Posted June 3, 2008 Posted June 3, 2008 vehicle createVehicle ( int model, float x, float y, float z, [float rx, float ry, float rz, string numberplate] ) http://development.mtasa.com/index.php? ... ateVehicle also note dont use ; after each function in LUA
Simbad de Zeeman Posted June 3, 2008 Posted June 3, 2008 And you better use a .map Can you explain why its better to use a .map file for much vehicles? something with the streamer or something?
50p Posted June 3, 2008 Posted June 3, 2008 also note dont use ; after each function in LUA Why not? It's optional. What it means is that you can use it.
Stevvo Posted June 3, 2008 Posted June 3, 2008 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.
eAi Posted June 3, 2008 Posted June 3, 2008 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!
HouseMD Posted June 3, 2008 Posted June 3, 2008 how do maps have less brandwidth, if the server sends the map to the client will be almost the same as the server doing createObjects and everything else in the map, get my point?
Winky Posted June 4, 2008 Posted June 4, 2008 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.
DutchCaffeine Posted June 4, 2008 Posted June 4, 2008 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.
Winky Posted June 4, 2008 Posted June 4, 2008 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.
Ace_Gambit Posted June 4, 2008 Posted June 4, 2008 It happends on a server were I made a vehicle map for it. Some times it does that when the vehicle is not within streaming radius of an active player.
Mr.Hankey Posted June 4, 2008 Posted June 4, 2008 Couldn't that be solved by adding some negative z velocity to the vehicle when it's stream by any player?
capitanazop Posted June 4, 2008 Author Posted June 4, 2008 And you better use a .map any samp cars to .map converter???
Winky Posted June 4, 2008 Posted June 4, 2008 Couldn't that be solved by adding some negative z velocity to the vehicle when it's stream by any player? you mean setElementVeloCity? I will try.
Ace_Gambit Posted June 4, 2008 Posted June 4, 2008 (edited) LOL, wrong topic... Edited June 5, 2008 by Guest
Guest Posted June 7, 2008 Posted June 7, 2008 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; }
50p Posted June 8, 2008 Posted June 8, 2008 Reamins and capitanazop, there is somewhere on this forum a link to an on-line map converter.
capitanazop Posted June 8, 2008 Author Posted June 8, 2008 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now