Raised This Month: $ Target: $400
 0% 

help with esf plugin; dragon ball respawner


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
theangleofdoom
Junior Member
Join Date: Mar 2006
Old 05-13-2006 , 07:02   help with esf plugin; dragon ball respawner
Reply With Quote #1

right, i am a compleat noob at plugins and this is my first plugin so can some help me fix this.

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#include <fun>
#include <esf>

new PLUGIN[]="Dragon Ball Spawner"
new AUTHOR[]="TheAngel"
new VERSION[]="1.00"

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar("dbs_on", "1")
	register_concmd("dbs_respawn", "cmd_respawn", ADMIN_LEVEL_A, "- respawn the balls")
}

public cmd_respawn(id, level, cid)
{
	if (get_cvar_num("dbs_on")==0)
	{
		return PLUGIN_HANDLED
	} else {
		if (esf_has_dragonball=1)
		{
			console_cmd(+attack)
			console_cmd(-attack)	
		}
		remove_entity("item_dragonball")
		remove_entity("item_dragonball")
		remove_entity("item_dragonball")
		remove_entity("item_dragonball")
		remove_entity("item_dragonball")
		remove_entity("item_dragonball")
		remove_entity("item_dragonball")
		create_entity("item_dragonball")
		create_entity("item_dragonball")
		create_entity("item_dragonball")
		create_entity("item_dragonball")
		create_entity("item_dragonball")
		create_entity("item_dragonball")
		create_entity("item_dragonball")
		server_cmd(say "The Dragon Balls have all reset and are now where they spawn."
		return PLUGIN_HANDLED
	}
}
theangleofdoom is offline
theangleofdoom
Junior Member
Join Date: Mar 2006
Old 05-14-2006 , 17:45  
Reply With Quote #2

is there anyone who can help me?
theangleofdoom is offline
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 05-14-2006 , 19:07  
Reply With Quote #3

Code:
remove_entity item_dragonball
      remove_entity item_dragonball
      remove_entity item_dragonball
      remove_entity item_dragonball
      remove_entity item_dragonball
      remove_entity item_dragonball
      remove_entity item_dragonball
      create_entity item_dragonball
      create_entity item_dragonball
      create_entity item_dragonball
      create_entity item_dragonball
      create_entity item_dragonball
      create_entity item_dragonball
      create_entity item_dragonball
Turn that into
Code:
      remove_entity("item_dragonball")
      create_entity("item_dragonball")
you seem new to coding.
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
theangleofdoom
Junior Member
Join Date: Mar 2006
Old 05-18-2006 , 11:55  
Reply With Quote #4

ta. i am new and im trying to make one, i learn easier when i do something rather than reading... but i have read lots of guides.
theangleofdoom is offline
theangleofdoom
Junior Member
Join Date: Mar 2006
Old 05-18-2006 , 15:30  
Reply With Quote #5

now when i compile this it now says;
[img]http://img236.**************/img236/5221/compileproblem5rt.jpg[/img]
any help will be apricated...
theangleofdoom is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 05-18-2006 , 15:34  
Reply With Quote #6

change line 21 to
Code:
   if (get_cvar_num("dbs_on")==0)

and next time use the [small] tag instead of the [code] tag...
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
theangleofdoom
Junior Member
Join Date: Mar 2006
Old 05-19-2006 , 09:40  
Reply With Quote #7

ta but im still getting compile problems...
[img]http://img211.**************/img211/9638/compileproblem1qr.jpg[/img]
theangleofdoom is offline
theangleofdoom
Junior Member
Join Date: Mar 2006
Old 05-22-2006 , 11:43  
Reply With Quote #8

is there anyone who can help me... its just a simple add and remove entity script.
theangleofdoom is offline
Reply


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 05:10.


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