Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Luby's SA-MP to MTA Converter 2008
- // GTAMScripting.info
- // To use : Paste your code in ToSave function, compile it and run as gamemode :D
- #include <file>
- #include <float>
- #include <string>
- native format(output[], len, const format[], {Float,_}:...);
- #define MAP_NAME "MTA.txt"
- #define PLATES "By Luby"
- main(){}
- native print(str[]);
- forward OnGameModeInit();
- public OnGameModeInit(){
- fremove(MAP_NAME);
- print("Please wait ...");
- if(ToSave())print("Done!");
- return 1;
- }
- ToSave(){
- // Don't change ANYTHING above this line !
- // Put there your objects and vehicles written in Pawn.
- // Don't change ANYTHING below this line !
- return 1;
- }
- stock CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ){
- new str[256];
- format(str,256,"createObject(%d,%f,%f,%f,%f,%f,%f) -- Generated by Luby's SA-MP to MTA Converter \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){
- #pragma unused color1
- #pragma unused color2
- new str[256];
- format(str,256,"createVehicle(%d,%f,%f,%f,0.0,0.0,%f,\"%s\") -- Generated by Luby's SA-MP to MTA Converter \r\n",modelid, spawn_x, spawn_y, spawn_z, z_angle, PLATES);
- 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,"createVehicle(%d,%f,%f,%f,0.0,0.0,%f,\"%s\") -- Generated by Luby's SA-MP to MTA Converter \r\n",modelid, spawn_x, spawn_y, spawn_z, z_angle, PLATES);
- new File:fhandle;
- fhandle = fopen(MAP_NAME, io_append);
- fwrite(fhandle, str);
- fclose(fhandle);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement