AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help with esf plugin; dragon ball respawner (https://forums.alliedmods.net/showthread.php?t=28348)

theangleofdoom 05-13-2006 07:02

help with esf plugin; dragon ball respawner
 
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 05-14-2006 17:45

is there anyone who can help me?

Smokey485 05-14-2006 19:07

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.

theangleofdoom 05-18-2006 11:55

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 05-18-2006 15:30

now when i compile this it now says;
[img]http://img236.**************/img236/5221/compileproblem5rt.jpg[/img]
any help will be apricated...

Greenberet 05-18-2006 15:34

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

and next time use the [small] tag instead of the [code] tag...

theangleofdoom 05-19-2006 09:40

ta but im still getting compile problems...
[img]http://img211.**************/img211/9638/compileproblem1qr.jpg[/img]

theangleofdoom 05-22-2006 11:43

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


All times are GMT -4. The time now is 05:10.

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