AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need help with a noob thing (https://forums.alliedmods.net/showthread.php?t=63572)

UberStrike 11-24-2007 16:42

I need help with a noob thing
 
trying to make a motd pop-up from scratch.. meh..

Code:

public plugin_int()
{
    register_concmd("say test","rules")
}
public rules(id)
{
    new allinfo[1023]
    format(allinfo,1022,"Rules are here but this is example")
    show_motd(id,allinfo,"Test")
}
            }
        }
    }
    return PLUGIN_HANDLED
}


ConnorMcLeod 11-24-2007 16:58

Re: I need help with a noob thing
 
Code:
public plugin_init() // plugin_init, not plugin_int() {     register_plugin("Rules", "0.1", "UberStrike") //register your plugin     register_concmd("say test", "rules") // this is good } public rules(id) {     new len = 1023  // this will allow you to add lines to your motd     new allinfo[1024]     new n = 0       // this is the current lengh of the motd     //current lenght is n=0, so start format at 0 (allinfo[n])     //len - n is what the still avaible lenght     n += formatex(allinfo[n], len - n, "Rules are here but this is example")     //we have just add above sentence lengh to n         //current lenght is now something like n=32     n += formatex(allinfo[n], len - n, "1. Here the first rule")     n += formatex(allinfo[n], len - n, "2. Here the second rule")     show_motd(id, allinfo, "Test")         return PLUGIN_HANDLED }


All times are GMT -4. The time now is 01:14.

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