Hello folks,
I have to make one plugin with a simply function of removing Entity (yeah plugin, don't ask why), so far it looks like that:
Quote:
...
int entityID = atoi(engine->Cmd_Argv(1));
edict_t *pEntity = engine->PEntityOfEntIndex(entityID);
char parname[7];
memcpy(parname,pEntity->GetClassName(),7);
bool issame = strcmp(parname,"weapon_") == 0;
if(issame){ //we've got weapon so lets remove it
engine->RemoveEdict(pEntity);
Msg("tried to remove entity\n");
}
...
Is it good? I mean I didn't test it yet (can't now), but I hope it will work.