Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum Vehicle_informations
- {
- v_ID,
- v_Model,
- v_Color1,
- v_Color2,
- Float:v_PosX,
- Float:v_PosY,
- Float:v_PosZ,
- Float:v_PosA,
- };
- CMD:veh(playerid, params[])
- {
- new
- query[800],
- Float:x,
- Float:y,
- Float:z,
- Float:a;
- GetPlayerFacingAngle(playerid, a);
- GetPlayerPos(playerid, x, y, z);
- new vehicleid = CreateVehicle(560, x+2.0, y+2.0, z+3.0, a+90, -1, -1, 0);
- LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
- SetVehicleToRespawn(vehicleid);
- Vehicle_infos[vehicleid][v_Model] = 560;
- Vehicle_infos[vehicleid][v_Color1] = -1;
- Vehicle_infos[vehicleid][v_Color2] = -1;
- Vehicle_infos[vehicleid][v_PosX] = Float:x;
- Vehicle_infos[vehicleid][v_PosY] = Float:y;
- Vehicle_infos[vehicleid][v_PosZ] = Float:z;
- Vehicle_infos[vehicleid][v_PosA] = Float:a;
- // Insert DB
- mysql_format(dbhandle, query, sizeof(query), "INSERT INTO `server_vehicles` SET Model='%d',Color1='%d',Color2='%d',PosX='%d',PosY='%d',PosZ='%d',PosA='%d'",
- Vehicle_infos[vehicleid][v_Model], Vehicle_infos[vehicleid][v_Color1], Vehicle_infos[vehicleid][v_Color2], Vehicle_infos[vehicleid][v_PosX], Vehicle_infos[vehicleid][v_PosY], Vehicle_infos[vehicleid][v_PosZ], Vehicle_infos[vehicleid][v_PosA]);
- mysql_tquery(dbhandle, query, "SendQuery", "");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment