Witam, chce, żeby komenda !ammo nie działa na granaty,ale wyskakuje błąd:
C:\srcds\css\cstrike\addons\sourcemod\scripting>spcomp ammo.sp
SourcePawn Compiler 1.5.0-dev+3742
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC
ammo.sp(32) : warning 213: tag mismatch
Header size: 3868 bytes
Code size: 17176 bytes
Data size: 2220 bytes
Stack/heap size: 16384 bytes; Total requirements: 39648 bytes
1 Warning.
A to kod pluginu:
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <smlib>
#include <colors>
#include <css_weapons>
#define PLUGIN_VERSION "v1.0"
#define CS_TEAM_NONE 0 /**< No team yet. */
#define CS_TEAM_SPECTATOR 1 /**< Spectators. */
#define CS_TEAM_T 2 /**< Terrorists. */
#define CS_TEAM_CT 3 /**< Counter-Terrorists. */
public Plugin:myinfo =
{
name = "ZmAmmo",
author = "Knopers",
description = "Plugin dla snickersa",
version = "PLUGIN_VERSION",
url = "http://heavycraft.pl/"
}
public OnPluginStart()
{
CreateConVar("zm_ammo", PLUGIN_VERSION, "version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
PrintToServer("[Ammo]Plugin jest gotowy do pracy !");
RegConsoleCmd("sm_ammo", sm_ammo);
}
public Action:sm_ammo(client, args)
{
new weapon = Client_GetActiveWeapon(client);
if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) == 3) && (Client_GetActiveWeapon(client) != WEAPON_SMOKEGRENADE) )
{
new primaryAmmo = 999
new secondaryAmmo = 999
Client_SetWeaponPlayerAmmoEx(client, weapon, primaryAmmo, secondaryAmmo);
CPrintToChat(client, "{red}[KIT] {default}Amunicja dodana.");
}else{
CPrintToChat(client, "{red}[KIT] {default}Nie dla zombie amunicja <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/smile.png' class='bbc_emoticon' alt=':)' />");
}
}