Right.
1) Remove buyzones is my suggestion.
What you need to do is to loop through each entity that is a "func_buyzone" and kill it.
Code:
new ent ;
// create our "entity" variable.
// this will hold the currently looked at entity
while ( ( ent = ( engfunc(EngFunc_FindEntityByString,ent,"classname","func_buyzone")) ) )
//keep setting ent to the next entity that is called func_buyzone, for as long as there are more
{
engfunc(EngFunc_RemoveEntity,ent) ;
// and kill this entity
}
Call that on map start, so plugin_init or w/e.
(I think ... don't trust that last statement)
2) Register the "touch" event between the player and the gun, and return FMRES_SUPERCEDE to block it:
Code:
public plugin_init()
{
// during our initialisation function
register_forward(FM_Touch,"on_touch",0)
// register the "touch" event to a function (that we wrote) called on_touch
// whenever two bodies touch, this function will be called
}
public on_touch(id,ent)
{ if ( !is_user_connected(id) || !pev_valid(ent))
// if "id" is not a player, or "ent" is not an entity (object) quit
return FMRES_IGNORED ;
static classname[32] ;
// create a classname variable
// "static" means use the same variable every time the function is called
pev(ent,pev_classname,classname,sizeof classname - 1 )
// get ent's classname
if ( ( ! equal(classname,"weapon",6) ) && ( !equal(classname,"armoury",7) ) )
// if it doesn't start "weapon" or "armoury", we don't care
return FMRES_IGNORED ;
return FMRES_SUPERCEDE ;
// this means "block the event"
}
To make someone invisible, you need to set their rendering, and specify the "alpha" as anything < 255.
Code:
set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, ALPHA [e.g. 30])
If you need any comments explaining any of the code just ask.
If I don't pick it up, someone else should.