Raised This Month: $ Target: $400
 0% 

First plugin help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rohit
Junior Member
Join Date: Nov 2005
Old 04-02-2006 , 16:43   First plugin help
Reply With Quote #1

Hello,

When I load my (first) plugin in the server. It says that de event is wrong. Ramono and I couldn't find the good event. So I hope if one of you guys can help me

And yes, the code is from Ramono I have permission from him 2 use it. And I'm justing practicing

//edit
Forgotten
it's for TS


Code:
public plugin_init() {
	register_plugin("Eerste plugin", "1.0", "Ro-WieT")
	register_event("Curweapon","Event_curweapon", "be")
	register_cvar("sv_speed", "1")
	register_concmd("amx_m4","cv_speed", ADMIN_CVAR," : <0 or 1 or 2> Change's  CVAR")
}

public Event_curweapon(id)
{
	new iClip, iAmmo, iWeapID = get_user_weapon(id, iClip, iAmmo)
	{
		if (get_cvar_num("sv_speed") == 0)
		{
			if (iWeapID == TSW_M4A1)
			set_user_maxspeed (id, 275.0)
			else
			set_user_maxspeed (id, 275.0)
		}
		
		if (get_cvar_num("sv_speed") == 1)
		{
			if (iWeapID == TSW_M4A1)
			set_user_maxspeed (id, 1500.0)
			else 
			set_user_maxspeed (id, 275.0)
		}
		
		if (get_cvar_num("sv_speed") == 2)
		{
			if (iWeapID == TSW_M4A1)
			set_user_maxspeed (id, 1500.0)
			ts_createpwup (TSPWUP_SUPERJUMP) + 256
			else
			set_user_maxspeed (id, 1500.0)
		         ts_createpwup (TSPWUP_SUPERJUMP) - 256
		}
		
	}
}
Rohit is offline
 


Thread Tools
Display Modes

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 16:41.


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