PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "He-slap"
#define VERSION "1.0"
#define AUTHOR "r4nDoMz"
register_cvar("heslap_dmg", "75")
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
register_concmd("say /he","henade","1","Gives a nade, but slaps you")
public henade()
{
new dmg = get_cvar_num("heslap_dmg")
give_item(id,"weapon_hegrenade")
user_slap(id,dmg,0)
}
Wtf is wrong with the code? I know that give_item(id,"weapon_hegrenade")
is wrong but what do the other errors mean?
PHP Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// Heslap.sma
// C:\Documents and Settings\******\Desktop\compiler\Heslap.sma(8) : error 021: sy
mbol already defined: "register_cvar"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(16) : error 021: s
ymbol already defined: "register_concmd"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : error 017: u
ndefined symbol "give_item"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : warning 215:
expression has no effect
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : error 001: e
xpected token: ";", but found ")"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : error 029: i
nvalid expression, assumed zero
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : fatal error
107: too many error messages on one line
//
// Compilation aborted.
// 6 Errors.
// Could not locate output file C:\Documents and Settings\*****\Desktop\compiler\
compiled\Heslap.amx (compile failed).
//
// Compilation Time: 0.19 sec
// ----------------------------------------
Press enter to exit ...
__________________