[QUOTE=Grey83;2789495]why not in this way?
PHP Code:
#pragma semicolon 1
#include <sdktools_functions>
static const char MODEL[] = "models/_*.mdl"; // path to used player model
bool bPrecached;
public OnMapStart()
{
bPrecached = IsModelPrecached(MODEL) || PrecacheModel(MODEL, true);
}
public OnPluginStart()
{
HookEvent("player_spawn", Event_Spawn);
}
public void Event_Spawn(Event event, const char[] name, bool dontBroadcast)
{
if(!bPrecached) return;
int client = GetClientOfUserId(event.GetInt("userid"));
if(client && IsPlayerAlive(client)) SetEntityModel(client, MODEL);
}
[/QUOTE
It just hadn't occurred to me to do it that way, I quite liked your solution, it simplifies it too much