AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bad load (https://forums.alliedmods.net/showthread.php?t=217852)

deadbunny 06-08-2013 11:11

Bad load
 
Hello !
I have a SimonMenu plugin. It doesn't give errors at compilation, but , in amx_plugins appears with BAD LOAD and it doesn't work. Can you help me?
Code:

#include <amxmodx>
#include <hamsandwich>
#include <engine>

native get_simon()
#define SOUND_BELL        "brass_bell_C.wav"
#define VERSION                                "1.0"

public plugin_init()
{
register_clcmd("/simonmenu", "simonmenu")
register_clcmd("/simon", "simonmenu")
register_plugin("SimonMenu", VERSION, "zBANG !!")
}

public simonmenu(id)
{
        if(id != get_simon())
                return PLUGIN_HANDLED
               
        static menu, menuname[64], option[64]
       
        formatex(menuname, charsmax(menuname), "Simon's menu")
        menu = menu_create(menuname, "menu_handler")
       
        formatex(option, charsmax(option), "rDeschide celulele")
        menu_additem(menu, option, "1", 0)
       
        formatex(option, charsmax(option), "yDing !")
        menu_additem(menu, option, "2", 0)
       
        formatex(option, charsmax(option), "Zi speciala !")
        menu_additem(menu, option, "3", 0)
       
        formatex(option, charsmax(option), "Acorda FreeDay !")
        menu_additem(menu, option, "4", 0)

        formatex(option, charsmax(option), "Schimba HATS !")
        menu_additem(menu, option, "5", 0)

        formatex(option, charsmax(option), "Porneste modul BOX !")
        menu_additem(menu, option, "6", 0)
       
        menu_display(id, menu)
       
        return PLUGIN_CONTINUE
}
public plugin_precache() precache_sound(SOUND_BELL)

public menu_handler(id, menu, item)
{
        if(item == MENU_EXIT)
        {
                menu_destroy(menu)
                return PLUGIN_HANDLED
        }
        static dst[32], data[5], access, callback
        menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
        menu_destroy(menu)
       
        switch(data[0])
        {
                      case('1'):
      {
        jail_open()
      }
      case('2'):
      {
        emit_sound(0, CHAN_AUTO, "jbextreme/brass_bell_C.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
      }
      //case('5'):
     
      case('3'): {
        client_cmd(id,"say /days")
      }
      case('4'):
    {
    client_cmd(id,"say /fd")
    }
      case('5'):
{
    client_cmd(id,"say /hats")
}
      case('6'):
{
    client_cmd(id,"say /box")
}
  }
        return PLUGIN_CONTINUE
}
public jail_open()
{
        new g_Buttons[10]
        static i
        for(i = 0; i < sizeof(g_Buttons); i++) {
                if(g_Buttons[i]) {
                        ExecuteHamB(Ham_Use, g_Buttons[i], 0, 0, 1, 1.0)
                        entity_set_float(g_Buttons[i], EV_FL_frame, 0.0)
                        }
                }
}
public divide_teams(id) {
if (get_simon() == id) {
        new playerCount, i
        new Players[32]
        new bool:orange = true
        get_players(Players, playerCount, "ac")
        for (i=0; i<playerCount; i++) {
                if (get_user_team(Players[i]) == 1 && is_user_alive(Players[i]))
                {
                        if (orange)
                        {
                                entity_set_int(Players[i], EV_INT_skin, 1)
                                orange=false;
                        }
                        else
                        {
                                entity_set_int(Players[i], EV_INT_skin, 2)
                                orange=true;
                        }
                }
        }
}
return PLUGIN_HANDLED
}

Help me, fast.... :(

YamiKaitou 06-08-2013 20:30

Re: Bad load
 
Look at the output of "rcon amxx plugins" and it will tell you the reason for the Bad Load at the bottom of the list


All times are GMT -4. The time now is 16:20.

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