Ps.Czemu nie mogę "hookować" round_start ?
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <colors>
#define PLUGIN_VERSION "v1.0"
public Plugin:myinfo =
{
name = "ZM Kit",
author = "Knopers",
description = "Plugin dla snickersa",
version = "PLUGIN_VERSION",
url = ""
};
public OnPluginStart()
{
CreateConVar("sm_zmkit", PLUGIN_VERSION, "version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
HookEvent("player_spawn", Event_PlayerSpawn);
PrintToServer("[Knopers]Plugin wlanczony");
HookEvent("round_start", Event_RoundStart);
RegConsoleCmd("sm_m4a1", sm_m4a1);
RegConsoleCmd("sm_elite", sm_elite);
RegConsoleCmd("sm_deagle", sm_deagle);
RegConsoleCmd("sm_ak47", sm_ak47);
RegConsoleCmd("sm_m249", sm_m249);
RegConsoleCmd("sm_m3", sm_m3);
RegConsoleCmd("sm_p90", sm_p90);
RegConsoleCmd("sm_ump45", sm_ump45);
}
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_hegrenade");
GivePlayerItem(client, "weapon_smokegrenade");
}
}
public Action:Event_RoundStart(Handle:event, any:userid, args)
{
for(new client=1; client<=MaxClients; client++)
{
if(!IsClientInGame(client) || IsFakeClient(client) || !IsPlayerAlive(client))
continue;
if(GetClientTeam(client) > 1)
{
CPrintToChat(client, "{red}[KIT] {default}Granaty dodane do ekwipunku");
}
}
}
public Action:sm_p90(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_p90");
}
}
public Action:sm_ump45(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_ump45");
}
}
public Action:sm_m249(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_m249");
}
}
public Action:sm_ak47(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_ak47");
}
}
public Action:sm_deagle(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_deagle");
}
}
public Action:sm_elite(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_elite");
}
}
public Action:sm_m4a1(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_m4a1");
}
}
public Action:sm_m3(client, args)
{
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) )
{
GivePlayerItem(client, "weapon_m3");
}
}


Dodatki SourceMod












