Hello.I need simple plugin to change model for every player model.This plugin does't work ... Server will crash or plugin didn't add model for players.Anybody have you better ideas how can i give model for players ?
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
public Plugin:myinfo =
{
name = "PLAYERMODEL",
author = "Unknown",
description = "<- Description ->",
version = "1.0",
url = "<- URL ->"
}
public void OnPluginStart()
{
HookEvent("player_spawn", EventPlayerSpawn);
}
public EventPlayerSpawn(Handle:event,const String:name[],bool:dontBroadcast) {
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new team = GetClientTeam(client);
if (!IsFakeClient(client))
{
if ((team == 1))
SetEntityModel(client, "HERE T MODEL");
else if ((team == 2))
SetEntityModel(client, "HERE CT MODEL");
}
}