I am making a plugin, where the player can choose appearence.
Well when player spawn, I set them a model but without head, and then I create an entity, It follows Player, and I set it a model like a head, Which has been chosen by Client after respawn, but for this reason my FPS down...
and I was thinking why the Lasermine plugin, makes when a lot of lasermines are in same places, and I saw them, my fps don't go down.
Please help me, Is there anyway where I can create an entity and my fps don't go down?
Because I am working on it for a long time and I cant believe that at last moment...
Thank you for reading it and I post a part of plugin for help if you didn't understand:
PHP Code:
/*Function Ham_Spawn... cabeza[id] is ent's variable, added like a global variable.*/
PonerleFollower(cabeza[id], id, MOVETYPE_FOLLOW, "models/ruso.mdl");
cs_set_user_model(id, "selva");
//Anyway
stock PonerleFollower(ent, owner, movetype, szModelEnt[]) {
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
set_pev(ent, pev_movetype, movetype);
set_pev(ent, pev_aiment, owner);
engfunc(EngFunc_SetModel, ent, szModelEnt);
set_pev(ent, pev_owner, owner);
dllfunc(DLLFunc_Spawn, ent);
}
One more thing that can help, when I do all of this, the player seems as if breathing fast, but when I dont put any entity that follow player, the player dont breath fast.
Greetings.