I cannot find why im getting the errors in line 26 and 47-47.
Both of them use Ownerteam inside the code. Whats the problem?
Its anti-team seems to not be working. Any ideas?
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>
#include <engine>
new owner
new Ownerteam
public plugin_init()
{
register_plugin("Nade-Slap","1.0","r4nDoMz")
register_cvar("nslap_dmg", "5")
register_touch("grenade", "player", "touch_nade")
register_cvar("amx_nslap", "1")
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_hegrenade", "Nadethrow", 1 ) // If the user throws a nade, we get the origin of it in the function
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_flashbang", "Nadethrow", 1 )
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_smokegrenade", "Nadethrow", 1 )
}
public touch_nade(nade, id)
{
new hitTeam = cs_get_user_team(id)
if(Ownerteam == hitTeam)
{
return
}
if(!get_cvar_num("amx_nslap"))
{
return
}
entity_set_edict(nade, EV_ENT_aiment, id)
user_slap(id, get_cvar_num("nslap_dmg"), 0)
entity_set_int(nade, EV_INT_sequence, 0)
}
public Nadethrow()
{
pev(pev_owner, owner)
Ownerteam = cs_get_user_team(owner)
}
Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// nade-slap.sma
// C:\Documents and Settings\nick\Desktop\compiler1\nade-slap.sma(26) : warning
213: tag mismatch
// C:\Documents and Settings\nick\Desktop\compiler1\nade-slap.sma(46 -- 47) : wa
rning 213: tag mismatch
// Header size: 676 bytes
// Code size: 1400 bytes
// Data size: 752 bytes
// Stack/heap size: 16384 bytes; estimated max. usage=42 cells (168 bytes)
// Total requirements: 19212 bytes
//
// 2 Warnings.
// Done.
//
// Compilation Time: 0.7 sec
// ----------------------------------------
Press enter to exit ...
__________________