Quote:
Originally Posted by Natsheh
I rather to see an entity formed with a car model than using the func_vehicle
BTW the plugin you release should also work on the hlds version.
|
That's just the beginning. If you take a look at his code, you'll find things like this:
Code:
#include <amxmodx>
#include <amxmodx>
Double including amxmodx :v
Code:
public add_car(coordinates[3])
{
new carbuffer[1024];
new curseconds = tickcount();
formatex(carbuffer, sizeof(carbuffer), "^n\
{^n\
^"classname^" ^"cycler_sprite^"^n\
^"model^" ^"models/vehicle_control.bsp^"^n\
^"origin^" ^"-7192 -7192 -8192^"^n\
}^n\
{^n\
^"classname^" ^"cycler_sprite^"^n\
^"model^" ^"models/vehicle.bsp^"^n\
^"origin^" ^"-7192 -7192 -8192^"^n\
}^n\
{^n\
^"classname^" ^"path_track^"^n\
^"targetname^" ^"stop%d^"^n\
^"target^" ^"xstop%d^"^n\
^"origin^" ^"%d %d %d^"^n\
}^n\
{^n\
^"classname^" ^"path_track^"^n\
^"targetname^" ^"xstop%d^"^n\
^"target^" ^"stop%d^"^n\
^"origin^" ^"%d %d %d^"^n\
}^n\
{^n\
^"classname^" ^"func_vehiclecontrols^"^n\
^"target^" ^"xcar%d^"^n\
^"model^" ^"models/vehicle_control.bsp^"^n\
^"angles^" ^"0 0 0^"^n\
^"origin^" ^"%d %d %d^"^n\
}^n\
{^n\
^"classname^" ^"func_vehicle^"^n\
^"targetname^" ^"xcar%d^"^n\
^"target^" ^"stop%d^"^n\
^"model^" ^"models/vehicle.bsp^"^n\
^"length^" ^"120^"^n\
^"width^" ^"222^"^n\
^"speed^" ^"500^"^n\
^"startspeed^" ^"60^"^n\
^"angles^" ^"0 0 0^"^n\
^"origin^" ^"%d %d %d^"^n\
}",
curseconds,
curseconds,
coordinates[0],coordinates[1],coordinates[2] + 10,
curseconds,
curseconds,
coordinates[0] - 36,coordinates[1],coordinates[2] + 10,
curseconds,
coordinates[0],coordinates[1],coordinates[2] + 15,
curseconds,
curseconds,
coordinates[0],coordinates[1],coordinates[2] + 15);
write_file(mapfilename, carbuffer);
}
Indention please, this hurts my eyes.
Code:
new mapfilename[66];
new mapname[33];
public plugin_init()
{
register_plugin("Car spawner", "1.0", "Karaulov");
get_mapname(mapname,32);
formatex(mapfilename, sizeof(mapfilename), "maps\%s.ent", mapname);
register_clcmd("say addcar", "add_car_to_my_pos", _, "- spawn new car");
register_clcmd("say removecars", "add_car_to_my_pos", _, "- remove all modifications(.ent file)");
server_print("Current map:%s",mapname);
}
"sizeof(mapfilename)" should be "charsmax(mapfilename)".