daj mi chwilę to Ci napisze ;p
#include <sourcemod>
#include <sdktools>
#include <cstrike>
int g_iPlayerAttacker[MAXPLAYERS];
public Plugin myinfo =
{
name = "FK",
author = "mastah7991",
description = "Jesli Ci się podoba możesz wysłać 'donejta' przyjacielu :D",
version = "1.0",
url = "http://steamcommunity.com/id/mastah7991/"
};
public void OnPluginStart()
{
HookEvent("player_death", Event_PlayerDeath);
HookEvent("player_spawn", Event_PlayerSpawn);
RegConsoleCmd("sm_fk", FreeKill);
}
public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
if(IsValidPlayer(client))
g_iPlayerAttacker[client]=0;
}
public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
int attacker = GetClientOfUserId(event.GetInt("userid"));
if(IsValidPlayer(attacker))
if(IsValidPlayer(client))
g_iPlayerAttacker[client]=attacker;
}
Action FreeKill(int client, int args)
{
int attacker = g_iPlayerAttacker[client];
if(IsValidPlayer(attacker))
if(GetClientTeam(attacker)==CS_TEAM_CT)
PrintToChat(attacker,"Gracz %N Zglasza ze go zabiles bez podstawy czy cos takiego xD",client);
}
stock bool IsValidPlayer(int client)
{
if(client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) )
return true;
return false;
}
1. FK
ten drugi mogę napisać potem bo aktualnie lece pisać swoje xDD #rozgrzewka xD