Raised This Month: $ Target: $400
 0% 

Model Spawn - Crash


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 12-20-2005 , 22:15   Model Spawn - Crash
Reply With Quote #1

Ok, I try and spawn a model here for my car mod, and it crashes. The model doesn't show up or anything, and my server crashes. I did some troubleshooting to see the cause and it only crashes when I have
Code:
    new Float:maxs[3] = {64.0,64.0,36.0}     new Float:mins[3] = {-64.0,-64.0,-36.0}     entity_set_size(ent,mins,maxs)

Is there something wrong with that?
Thanks.

Here's the full code.

Code:
public makecarmdl(id) {         if(iscar[id] == 0) return PLUGIN_HANDLED         new Float:origin[3], authid[32]     entity_get_vector(id,EV_VEC_origin,origin)     new ent = create_entity("info_target")         entity_set_origin(ent,origin);     origin[1] += 50.0     entity_set_origin(id,origin)     entity_set_float(ent,EV_FL_takedamage,0.0)     //entity_set_float(ent,EV_FL_health,100.0)     new pcarid, query[256]     format(query,255,"SELECT CarID FROM users WHERE SteamID='%s'",authid)     result = dbi_query(dbc,query)     if( dbi_nextrow( result ) > 0 )         {         pcarid = dbi_field(result,1)         dbi_free_result(result)     }         new CarModel[32]     format(query,255,"SELECT CarModel FROM cars WHERE CarID='%i'",pcarid)     result = dbi_query(dbc,query)     if( dbi_nextrow( result ) > 0 )         {         dbi_field(result,1,CarModel,31)         dbi_free_result(result)     }         entity_set_string(ent,EV_SZ_classname,"car_parked");     entity_set_string(ent,EV_SZ_targetname,authid)     entity_set_model(ent,CarModel);     entity_set_int(ent,EV_INT_solid, 2)     //entity_set_byte(ent,EV_BYTE_controller1,125);     //entity_set_byte(ent,EV_BYTE_controller2,125);     //entity_set_byte(ent,EV_BYTE_controller3,125);     //entity_set_byte(ent,EV_BYTE_controller4,125);     new Float:maxs[3] = {64.0,64.0,36.0}     new Float:mins[3] = {-64.0,-64.0,-36.0}     entity_set_size(ent,mins,maxs)     entity_set_float(ent,EV_FL_animtime,2.0)     entity_set_float(ent,EV_FL_framerate,1.0)     entity_set_int(ent,EV_INT_sequence,0);     entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.01)             drop_to_floor(ent) }
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 


Thread Tools
Display Modes

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 15:51.


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