AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   editing .SMA (https://forums.alliedmods.net/showthread.php?t=27723)

zx0rq 04-27-2006 20:54

editing .SMA
 
I AM NOT TRYING TO PASS THIS(these) PLUGIN(s) AS MY OWN IN ANY WAY SHAPE OR FORM

I took the .sma of >THIS< plugin and edited a few strings. I changed all the words "rules" to "maps". I made it where when you're in my server and you type "/maps", instead typing "/showrules" and showing you rules it lists all the custom maps available for nomination. The help I want from you guys is what do I do to make it when a person types "/maps" the maps.txt file is read but it doesn't display (Player: /maps". Kind of like /rank and /top15 when you type those it doesn't show up in the text area it just shows you your rank or pops up the MOTD window with the top15.. My reason for this request is because I am planning on using my Task Scheduler to add a line

amx_task 5 amx_execall "say /maps" mr

I will NOT try to claim this as mine, I would NOT attempt to re-distribute it. It would be for personal-server use only..

Please help out if you know anything about scripting!! Thanks in advance, -zx0rq

Emp` 04-27-2006 21:17

using the original plugin as an example...
Code:

register_clcmd("say /rules", "clientrules", ADMIN_ALL, "- show rules")
find the function "clientrules"
Code:

public clientrules(id, level, cid) {
        new pID[1]
        pID[0] = id
       
        console_print(0,"[user %d]Print rules for me only",pID[0])
        printrules(pID[0])
}

before the "}" add "return PLUGIN_HANDLED"
Code:

public clientrules(id, level, cid) {
        new pID[1]
        pID[0] = id
       
        console_print(0,"[user %d]Print rules for me only",pID[0])
        printrules(pID[0])

        return PLUGIN_HANDLED
}

that should work :wink: :D

v3x 04-28-2006 14:33

Emp`: http://forums.alliedmods.net/showthread.php?t=26363


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

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