Jump to content

SCRIPTING: How to put vehicles in UG:MP


Mathese

Recommended Posts

 

Hello, my problem is that I am not able to spawn vehicles in UG: MP, here is a piece of code, I hope you can help me. Thank you.

 

INCLUDES:

#include <a_samp>

#include <YSI\y_ini>
#include <streamer>
#include <sscanf2>
#include <izcmd>
#include <djson>
#include <foreach>
#include <selec2>
#include <mSelection>
#include <yom_buttons>
#include <mapeos>
#include <JunkBuster>
#include <a_vehicles>
#include <ugmp>
#include <ugmp_vehicles>
#include <ugmp_models>

 

PLUGINS:

-sscanf

-ugmp

-streamer

 

CMD:crearauto(playerid, params[]) {
    new modelid, color1, color2;
    if (sscanf(params, "ddd", modelid, color1, color2)) return _Mensaje(playerid, 3, "0", "/crearauto [modelid] [color 1] [color 2]");
    new Float: X, Float: Y, Float: Z, Float: Angle;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    CreateVehicle(modelid, X, Y, Z, Angle, color1, color2, 0 ,0);

    return 1;

}

 

Edited by Mathese
Add plugins
Link to comment
Share on other sites

  • 5 weeks later...
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.