Raised This Month: $ Target: $400
 0% 

[HOW TO] Frag count


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
recimo
Junior Member
Join Date: Aug 2011
Old 07-11-2012 , 18:56   [HOW TO] Frag count
Reply With Quote #1

I searched and i found something, but not exactly what i need. I tried to improvise and when i compile code it register these warnings:
/tmp/textQvOx9E.sma( : error 017: undefined symbol "register_plugin"
/tmp/textQvOx9E.sma( : warning 215: expression has no effect
/tmp/textQvOx9E.sma( : warning 215: expression has no effect
/tmp/textQvOx9E.sma( : error 001: expected token: ";", but found ")"
/tmp/textQvOx9E.sma( : error 029: invalid expression, assumed zero

Im learning pawn. So, for practise Im trying to make plugin which will count user frags/kills. If number of frags/kills isn't bigger than 5 plugin will stop further action and if is opposite, hud message will be activated.

This is code:
Code:
#include <amxmodx>

#define PLUGIN "Test123"
#define VERSION "1.0"
#define AUTHOR "recimo"

new numfrags[17] 

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("DeathMsg", "num_of_frags", "a")
}
public num_of_frags(id)
{
	numfrags[id] = get_user_frags(id)
	numfrags[id]++
	if(!get_user_frags(id) > 5)
	{
	return PLUGIN_HANDLED
	}
	else (!get_user_frags(id) < 5)
	{
	set_hudmessage ( 150, 120, 30, -2.0, 0.45, 0, 6.0, 100.0, 0.1, 0.2, 4)
	show_hudmessage(id, "YOU ARE NOOB!")
	return PLUGIN_CONTINUE
	}
}
Im hoping that someone will tell me where im wrong and how to make it right.
recimo is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode