PHP Code:
// engine
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <vector>
new g_Classname[] = "func_car"
new g_Model[] = "models/worek.mdl"
public plugin_init() {
register_plugin("OMFG","HAX","LOL")
register_clcmd("say car","CmdSayCar")
register_touch(g_Classname,"player","TouchCar")
}
public plugin_precache() precache_model(g_Model)
public CmdSayCar(id) {
new Ent = create_entity("func_wall")
new origin[3]
new Float:org[3]
get_user_origin(id, origin, 3)
drop_to_floor(Ent)
IVecFVec (origin,org )
entity_set_origin(Ent, org)
entity_set_model(Ent,g_Model)
entity_set_string(Ent,EV_SZ_classname,g_Classname)
entity_set_int(Ent, EV_INT_solid, SOLID_BBOX)
entity_set_int(Ent, EV_INT_movetype, MOVETYPE_TOSS)
entity_set_size(Ent,Float:{-27.260000, -22.280001, -22.290001},Float:{27.340000, 26.629999, 29.020000})
entity_set_edict(Ent,EV_ENT_owner,id)
}
public TouchCar(Ent,id) {
entity_set_int(Ent, EV_INT_solid, SOLID_BBOX)
client_print(id, print_chat, "Bags touched")
}
Why can i go through the bags? I was looking for anserw a couple of hours and i can't find it.
I write this code after read this thread:
http://forums.alliedmods.net/showthr...ghlight=entity
Entity is making where I'm looking, size is good (touchcar shows it).