Raised This Month: $ Target: $400
 0% 

Need help with entities (solid and size)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-16-2009 , 07:11   Re: Need help with entities (solid and size)
Reply With Quote #1

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_pluginPLUGINVERSIONAUTHOR );
    
    
register_clcmd("say /cc""cmdCreateCar");
}

public 
plugin_precache()
    
precache_modelgszModel );
 
public 
cmdCreateCarid ) {
    if( 
get_user_flags(id) & ADMIN_CHAT ) {
        new 
origin[3], Float:FLorigin[3], Float:vAngles[3];
        
get_user_originidorigin);
        
        
FLorigin] = floatorigin[0] );
        
FLorigin] = floatorigin[1] );
        
FLorigin] = floatorigin[2] );
        
        
cmdCreateCar2(FLoriginvAngles);
    }
}
 
cmdCreateCar2Float:FLorigin[3], Float:vAngles[3] ) {
    new 
ent create_entitygClassname );
 
    if( 
is_valid_entent ) ) {
        new 
Float:gSizeMin[] = {-32.0, -32.0, -4.0};
        new 
Float:gSizeMax[] = {32.032.04.0};
        
        
entity_set_int(entEV_INT_movetypeMOVETYPE_NONE);
        
entity_set_vector(entEV_VEC_anglesvAngles);
        
entity_set_origin(entFLorigin);
        
        
DispatchSpawn(ent);
        
        
entity_set_model(entgszModel);
        
entity_set_int(entEV_INT_solidSOLID_BBOX);
        
entity_set_size(entgSizeMingSizeMax);
    }

__________________
xPaw is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode