Those returns was unneded, also you are sending angles to cmdCreateCar2, but they will be always 0.0 0.0 0.0, because you arent getting them from player, or what eever you want.
PHP Code:
#include <amxmodx>
#include <engine>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new const gszModel[] = "models/blockmaker/bm_block_bhop.mdl";
new const gClassname[] = "info_target";
public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR );
register_clcmd("say /cc", "cmdCreateCar");
}
public plugin_precache()
precache_model( gszModel );
public cmdCreateCar( id ) {
if( get_user_flags(id) & ADMIN_CHAT ) {
new origin[3], Float:FLorigin[3], Float:vAngles[3];
get_user_origin( id, origin, 2 );
FLorigin[ 0 ] = float( origin[0] );
FLorigin[ 1 ] = float( origin[1] );
FLorigin[ 2 ] = float( origin[2] );
cmdCreateCar2(FLorigin, vAngles);
}
}
cmdCreateCar2( Float:FLorigin[3], Float:vAngles[3] ) {
new ent = create_entity( gClassname );
if( is_valid_ent( ent ) ) {
new Float:gSizeMin[] = {-32.0, -32.0, -4.0};
new Float:gSizeMax[] = {32.0, 32.0, 4.0};
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE);
entity_set_vector(ent, EV_VEC_angles, vAngles);
entity_set_origin(ent, FLorigin);
DispatchSpawn(ent);
entity_set_model(ent, gszModel);
entity_set_int(ent, EV_INT_solid, SOLID_BBOX);
entity_set_size(ent, gSizeMin, gSizeMax);
}
}
__________________