AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help me figure out what i did wrong with this plugin (https://forums.alliedmods.net/showthread.php?t=25359)

randitobandito 03-12-2006 12:05

help me figure out what i did wrong with this plugin
 
so i got most of the source from someone on the forums posting to help someone who needed a sound plugin, then i modified it to fit my needs. when i use the online compiler i get this error

Code:

/home/users/amxmodx/tmp3/textM4HpeQ.sma(1) : error 013: no entry point (no public functions)
can you guys help me? lemme know if i need to post my souce

randitobandito 03-12-2006 12:11

meh, i decided just to post the source to aid the coding gods (you guys) in helping me.

Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "randitobandito"


public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
       
        // Add your code here...
}#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    register_plugin("Sounds", "1.0","randitobandito")
    register_clcmd("say", "handle_say")
    register_clcmd("say_team", "handle_say")
}

public plugin_precache()
{
    precache_sound("sounds/randysmusicmod/lol.mp3")
    precache_sound("sounds/randysmusicmod/techno.mp3")
    precache_sound("sounds/randysmusicmod/omg.wav")
    precache_sound("sounds/randysmusicmod/rock.mp3")
    precache_sound("sounds/randysmusicmod/fuck.wav")
    precache_sound("sounds/randysmusicmod/noob.wav")
    precache_sound("sounds/randysmusicmod/stfu.wav")
}

public handle_say(id)
{
    new Text[32]
    read_args(Text, 31)   

    remove_quotes(Text)

    if(equali(Text, "lol"))
        client_cmd(0, "spk sounds/randysmusicmod/lol.mp3")

    if(equali(Text, "techno"))
        client_cmd(0, "spk sounds/randysmusicmod/techno.mp3")

    if(equali(Text, "omg"))
        client_cmd(0, "spk sounds/randysmusicmod/omg.wav")

    if(equali(Text, "rock"))
        client_cmd(0, "spk sounds/randysmusicmod/rock.mp3")

    if(equali(Text, "fuck"))
        client_cmd(0, "spk sounds/randysmusicmod/fuck.wav")

    if(equali(Text, "noob"))
        client_cmd(0, "spk sounds/randysmusicmod/noob.wav")
       
    if(equali(Text, "noob"))
        client_cmd(0, "spk sounds/randysmusicmod/stfu.wav")

return PLUGIN_HANDLED
}


SweatyBanana 03-12-2006 12:11

post the plugin...how are we suposed to help if we cant even see what u did wrong?

randitobandito 03-12-2006 12:12

Quote:

Originally Posted by SweatyBanana
post the plugin...how are we suposed to help if we cant even see what u did wrong?

posted it

SweatyBanana 03-12-2006 12:12

first off u have 2 public plugin inits.

SweatyBanana 03-12-2006 12:15

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Sounds", "1.0","randitobandito")     register_clcmd("say", "handle_say")     register_clcmd("say_team", "handle_say") } public plugin_precache() {     precache_sound("sounds/randysmusicmod/lol.mp3")     precache_sound("sounds/randysmusicmod/techno.mp3")     precache_sound("sounds/randysmusicmod/omg.wav")     precache_sound("sounds/randysmusicmod/rock.mp3")     precache_sound("sounds/randysmusicmod/fuck.wav")     precache_sound("sounds/randysmusicmod/noob.wav")     precache_sound("sounds/randysmusicmod/stfu.wav") } public handle_say(id) {     new Text[32]     read_args(Text, 31)       remove_quotes(Text)     if(equali(Text, "lol"))          client_cmd(0, "spk sounds/randysmusicmod/lol.mp3")     if(equali(Text, "techno"))          client_cmd(0, "spk sounds/randysmusicmod/techno.mp3")     if(equali(Text, "omg"))          client_cmd(0, "spk sounds/randysmusicmod/omg.wav")     if(equali(Text, "rock"))          client_cmd(0, "spk sounds/randysmusicmod/rock.mp3")     if(equali(Text, "fuck"))          client_cmd(0, "spk sounds/randysmusicmod/fuck.wav")     if(equali(Text, "noob"))          client_cmd(0, "spk sounds/randysmusicmod/noob.wav")         if(equali(Text, "noob"))          client_cmd(0, "spk sounds/randysmusicmod/stfu.wav")     return PLUGIN_HANDLED }

randitobandito 03-12-2006 12:22

alright thanks man

edit: i just compiled and it worked perfectly, this is my first plugin so thanks for the help!

SweatyBanana 03-12-2006 12:28

np.

randitobandito 03-12-2006 12:34

shit, when i try saying ANYTHING in the chat on my dedicated server 1. no chat messages come up, and 2. the sounds dont play.

any idea why?

SweatyBanana 03-12-2006 12:44

If you need help with this, I suggest looking at this plugin:

http://forums.alliedmods.net/showthread.php?t=18779


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

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