okay.. ive been working on a plugin.. tried doing it with the knowledge of PAST HANDWALKING ONLY!
it failed

so now, im here again.. please, someone tell me wich way to go please..
PHP Code:
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <tfcx>
#include <engine>
#define PLUGIN "Spy Cloak"
#define AUTHOR "HLM"
#define VERSION "0.5 Beta"
new float:lasttime[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_PreThink(id)
{
while (lasttime[id] < get_systime) do lasttime[id] = get_systime + 3
new name[33]
get_user_name(id,name,32)
log_amx("loaded ham_spy_cloak for %s",name)
new class = entity_get_int(id, EV_INT_playerclass)
log_amx("%s is class %i",name,class)
if(class == 8)
{
log_amx("does class == 8?")
set_user_rendering(id,kRenderFxNone,_,_,_,kRenderTransAlpha,128)
log_amx("%s was cloaked!",name)
client_print(id,print_chat,"%s, as a spy you have a visibility cloak!",name)
new weapon = get_user_weapon(id)
if(weapon == TFC_WPN_KNIFE)
{
set_user_rendering(id,kRenderFxFlickerSlow,_,_,_,kRenderTransAlpha,85)
log_amx("%s is holding a knife!",name)
client_print(id,print_chat,"[AMXX] %s, The knife is making the cloak work better!",name)
}
}
log_amx("ham_spy_cloaked done loading for %s...",name)
return PLUGIN_HANDLED
}
Code:
//// SpyCloak.sma
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(22) : error 076:
syntax error in the expression, or invalid function call
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(22) : error 076:
syntax error in the expression, or invalid function call
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(22 -- 25) : warn
ing 213: tag mismatch
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(25) : error 001:
expected token: "while", but found "new"
// C:\Program Files\AMX Mod X\files\base\scripting\SpyCloak.sma(25) : fatal erro
r 107: too many error messages on one line
__________________