NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Default model set methods that works with CS, DoD, etc. doesn't work on ESF.
The way is the server_frame() (StartFrame in Fakemeta).
But the problem is that the StartFrame is called too often and is cousing lag.
The debug message "Model set" is printed like 5 or more timer per sec. if I move fast. If I stop the StartFrame, model changes back to default one.
Maybe anyone know how to set the model permanently so it wouldn't unchange to default one?
The way is the server_frame() (StartFrame in Fakemeta).
But the problem is that the StartFrame is called too often and is cousing lag.
PHP:
#include <amxmodx>
#include <fakemeta>
new g_MaxPlayers;
public plugin_init()
{
register_forward(FM_StartFrame, "StartFrame");
g_MaxPlayers = get_maxplayers();
}
public SetModel()
{
for (new Client = 1; Client <= g_MaxPlayers; Client++)
{
if (!is_user_connected(Client) || !is_user_alive(Client))
return;
switch (pev(Client, pev_playerclass))
{
case 1: engfunc(EngFunc_SetModel, Client, "models/custom/buu/buu.mdl");
case 2: engfunc(EngFunc_SetModel, Client, "models/custom/goku/goku.mdl");
case 3: engfunc(EngFunc_SetModel, Client, "models/custom/gohan/gohan.mdl");
case 4: engfunc(EngFunc_SetModel, Client, "models/custom/krillin/krillin.mdl");
case 5: engfunc(EngFunc_SetModel, Client, "models/custom/frieza/frieza.mdl");
case 6: engfunc(EngFunc_SetModel, Client, "models/custom/piccolo/piccolo.mdl");
case 7: engfunc(EngFunc_SetModel, Client, "models/custom/trunks/trunks.mdl");
case 8: engfunc(EngFunc_SetModel, Client, "models/custom/vegeta/vegeta.mdl");
case 9: engfunc(EngFunc_SetModel, Client, "models/custom/cell/cell.mdl");
}
client_print(Client, print_chat, "Model set");
}
}
Maybe anyone know how to set the model permanently so it wouldn't unchange to default one?