rMTA - Easy MTA-Race Map Converter (Scriptside) -
Narushi - 24.05.2013
Hello Guys,
I recently worked on an MTA map converter, since I work on a "New Dawn" project.
I have it normally installed in my script, so I do not know if the Include Buggs could
occur. Me, at least not yet noticed.
And besides, this is my very first include that I have created ..
You need:
-
Streamer Plugin
-
XML-Plugin
Overview of the commands:
Code:
#include <rMTA>
CreateVehicleEx(model, Float:pox, Float:poy, Float:poz, Float:poa, dimension, interior, c1, c2, spawn_d); // For Car-Spawning in a interior and dimension. Its and Dynamic Car!
SpawnInVehicle(playerid, model, Float:pox, Float:poy, Float:poz, Float:poa, dimension, interior, c1, c2, spawn_d); // For the Players, for spawning in vehicle (if you work on race-server).
VehicleChanger(Float:X, Float:Y, Float:Z, MID); // An Vehicle-Changer Pickup. (Racemap)
Load(const path[], pathmeta[], Float:DrawDistance = 200.0, VehRespawn = 20);
// This Functions is loading the map
Load (const path [], pathmeta [], Float: DrawDistance = 200.0, VehRespawn = 20)
path [] = This specifies the path where the map resides.
pathmeta [] = This is simply the specified folder in which the meta.xml is, if any. (Can you leave it empty "").
Which is simply there to read out the name of the map. Which you can call with the string "MapName".
DrawDistance = The DrawDistance for the dynamic objects
VehRespawn = Respawn_Delay of vehicles
The path [] is always located in the include folder. For example,
"map_x/mapname.map". That would have been
"scriptfiles/map_x/mapname.map".
In pathmeta [] you have exactly the same each write in addition to the map name. For example,
"map_x". The following are now accessed File
"scriptfiles/map_x/meta.xml".
Updates:
* 1.0 - Object Converter
* 1.1 - RacePickups Converter
* 1.2 - SpawnPoints Converter
* 1.3 - VehicleChanger Pickup
Here the Pastebin!
*pastebin updated*
Narushi
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
Jessyy - 24.05.2013
Change this
Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new VID = GetPlayerVehicleID(playerid);
new Float:V_X,Float:V_Y,Float:V_Z,Float:P_X,Float:P_Y,Float:P_Z,Float:P_A;
for(new i=0; i<MAX_PICKUPS; i++)
{
if(pickupid == Nitro[i]) {
AddVehicleComponent(VID,1010);
}
}
for(new i=0; i<MAX_PICKUPS; i++)
{
if(pickupid == Repair[i]) {
SetVehicleHealth(VID,100.0);
RepairVehicle(VID);
}
}
for(new i=0; i<MAX_PICKUPS; i++)
{
if(pickupid == VChange[i]) {
GetVehicleVelocity(VID,V_X,V_Y,V_Z);
GetVehiclePos(VID,P_X,P_Y,P_Z);
GetVehicleZAngle(VID,P_A);
DestroyVehicle(VID);
new createdCar = CreateVehicle(ChangeID[i],P_X,P_Y,P_Z,P_A,-1,-1,-1);
SetVehiclePos(createdCar,P_X,P_Y,P_A);
SetVehicleZAngle(createdCar,P_A);
PutPlayerInVehicle(playerid,createdCar,0);
SetVehicleVelocity(createdCar,V_X,V_Y,V_Z);
}
}
return 1;
}
To this:
Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new VID = GetPlayerVehicleID(playerid);
new Float:V_X,Float:V_Y,Float:V_Z,Float:P_X,Float:P_Y,Float:P_Z,Float:P_A;
for(new i=0; i<MAX_PICKUPS; i++)
{
if(pickupid == Nitro[i]) {
AddVehicleComponent(VID,1010);
break;
}
else if(pickupid == Repair[i]) {
SetVehicleHealth(VID,100.0);
RepairVehicle(VID);
break;
}
else if(pickupid == VChange[i]) {
GetVehicleVelocity(VID,V_X,V_Y,V_Z);
GetVehiclePos(VID,P_X,P_Y,P_Z);
GetVehicleZAngle(VID,P_A);
DestroyVehicle(VID);
new createdCar = CreateVehicle(ChangeID[i],P_X,P_Y,P_Z,P_A,-1,-1,-1);
SetVehiclePos(createdCar,P_X,P_Y,P_A);
SetVehicleZAngle(createdCar,P_A);
PutPlayerInVehicle(playerid,createdCar,0);
SetVehicleVelocity(createdCar,V_X,V_Y,V_Z);
break;
}
}
return 1;
}
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
Narushi - 24.05.2013
Oh, my fail
Thanks, i forgotten to break the loop ^^
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
serdar189 - 24.05.2013
gives an error
\pawno\include\rMTA.inc(17) : error 021: symbol already defined: "xml_open"
\pawno\include\rMTA.inc(1
: error 021: symbol already defined: "xml_close"
\pawno\include\rMTA.inc(19) : error 021: symbol already defined: "xml_get_bool"
\pawno\include\rMTA.inc(20) : error 021: symbol already defined: "xml_get_int"
\pawno\include\rMTA.inc(21) : error 021: symbol already defined: "xml_get_float"
\pawno\include\rMTA.inc(22) : error 021: symbol already defined: "xml_get_string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
skuaRe - 25.05.2013
nice include for MTA, nice
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
Narushi - 25.05.2013
Quote:
Originally Posted by serdar189
gives an error
\pawno\include\rMTA.inc(17) : error 021: symbol already defined: "xml_open"
\pawno\include\rMTA.inc(1 : error 021: symbol already defined: "xml_close"
\pawno\include\rMTA.inc(19) : error 021: symbol already defined: "xml_get_bool"
\pawno\include\rMTA.inc(20) : error 021: symbol already defined: "xml_get_int"
\pawno\include\rMTA.inc(21) : error 021: symbol already defined: "xml_get_float"
\pawno\include\rMTA.inc(22) : error 021: symbol already defined: "xml_get_string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
|
You Need:
- XML-Plugin
https://sampforum.blast.hk/showthread.php?tid=150755
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
serdar189 - 25.05.2013
I made the same mistake, but is
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
steki. - 25.05.2013
Is scriptside a thing?
Re: rMTA - Easy MTA-Race Map Converter (Scriptside) -
RayC - 23.12.2014
This really helped me thanks