Erik
Участник
- Сообщения
- 67
- Реакции
- 16
Попытался сам написать плагин вот такой, но что то то работает то нет, таймер ставил для того чтобы он не конфликтовал с другими плагинами на скины которые даются в начале раунда
Оффтоп
#include <cstrike>
#include <sdktools>
#define MAX_CLIENTS 129
public OnMapStart()
{
PrecacheModel("models/player/custom_player/step_one_ru/jb/zek_1/zek.mdl");
}
public OnPluginStart()
{
HookEvent("player_spawn", Event_PlayerSpawn);
}
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
CreateTimer(0.2, Timer_Qweerti_tarantino, _, TIMER_FLAG_NO_MAPCHANGE);
}
public Action Timer_Qweerti_tarantino(Handle hTimer, any UserId)
{
if (GetUserFlagBits(i) & ADMFLAG_ROOT) {
for (new i = 1; i <= MaxClients; i++) {
if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == CS_TEAM_T)
{
SetEntityModel(i, "models/player/custom_player/step_one_ru/jb/zek_1/zek.mdl");
PrintToChat(i, " \x02Скин установлен для игрока Qwerti Tarantino");
}
}
}
}
Оффтоп
#include <cstrike>
#include <sdktools>
#define MAX_CLIENTS 129
public OnMapStart()
{
PrecacheModel("models/player/custom_player/step_one_ru/jb/zek_1/zek.mdl");
}
public OnPluginStart()
{
HookEvent("player_spawn", Event_PlayerSpawn);
}
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
CreateTimer(0.2, Timer_Qweerti_tarantino, _, TIMER_FLAG_NO_MAPCHANGE);
}
public Action Timer_Qweerti_tarantino(Handle hTimer, any UserId)
{
if (GetUserFlagBits(i) & ADMFLAG_ROOT) {
for (new i = 1; i <= MaxClients; i++) {
if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == CS_TEAM_T)
{
SetEntityModel(i, "models/player/custom_player/step_one_ru/jb/zek_1/zek.mdl");
PrintToChat(i, " \x02Скин установлен для игрока Qwerti Tarantino");
}
}
}
}