Попробуй
Может что-то ступил, поправьДобавлено (18.02.2015, 19:07:25)
---------------------------------------------
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
new Float:fpos[MAXPLAYERS+1][3];
new Handle:Timer_CheckPos[MAXPLAYERS+1];
new chicken;
public OnPluginStart()
{
HookEvent("player_spawn", Event_PlayerSpawn);
}
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new player = GetClientOfUserId(GetEventInt(event, "userid"));
Timer_CheckPos[player] = CreateTimer(0.1, Timer_Checker, player, TIMER_REPEAT);
chicken = CreateEntityByName("chicken");
}
public Action:Timer_Checker(Handle:timer, any:player)
{
if(chicken != -1)
{
decl Float:poskur[3];
GetClientAbsOrigin(player, fpos[player]);
poskur[1] = fpos[player][1] + 180.0;
DispatchSpawn(chicken);
SetEntProp(chicken, Prop_Data, "m_takedamage", 0);
SetEntProp(chicken, Prop_Send, "m_fEffects", 0);
SetEntityRenderMode(chicken, RENDER_NONE);
TeleportEntity(chicken, poskur, NULL_VECTOR, NULL_VECTOR);
SetVariantString("!activator");
}
return Plugin_Continue;
}