Raised This Month: $ Target: $400
 0% 

Fakemeta Entity Spawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Minimum
Senior Member
Join Date: Jun 2006
Old 04-27-2007 , 22:53   Fakemeta Entity Spawn
Reply With Quote #1

Heres the problem, I cannot get this entity to appear when I execute this function. I know it spawns the item because it does not display the error message I have in here. Any suggestions on how to get this to work? I have already precached the model just for your info.

Code:
public spawn_item(itemid,amount,origin[3]) {     new targetname[64], Float:forigin[3]     formatex(targetname,63,"%i|%i",itemid,amount)     new Float:minsx[3] = { -2.5, -2.5, -2.5 }     new Float:maxsx[3] = { 2.5, 2.5, -2.5 }     new Float:angles[3] = { 0.0, 0.0, 0.0 }     forigin[0] = float(origin[0])     forigin[1] = float(origin[1])     forigin[2] = float(origin[2])     angles[1] = float(random_num(0,360))     new item = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))     if(!item) {         log_amx("ERROR: Item failed to spawn.")         return PLUGIN_HANDLED     }     set_pev(item,pev_targetname,targetname)     set_pev(item,pev_classname,"dropped_item")     set_pev(item,pev_mins,minsx)     set_pev(item,pev_maxs,maxsx)     set_pev(item,pev_angles,angles)     set_pev(item,pev_dmg,0.0)     set_pev(item,pev_dmg_take,0.0)     set_pev(item,pev_max_health,50000.0)     set_pev(item,pev_health,50000.0)     set_pev(item,pev_solid,SOLID_TRIGGER)     set_pev(item,pev_movetype,MOVETYPE_TOSS)     set_pev(item,pev_model,"models/roleplay/w_backpack.mdl")     set_pev(item,pev_origin,forigin)     return PLUGIN_HANDLED }
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
 



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 06:45.


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