Raised This Month: $ Target: $400
 0% 

Motd help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Artifact
Veteran Member
Join Date: Jul 2010
Old 06-24-2012 , 06:07   Motd help
Reply With Quote #1

How to put something in motd when I write this in plugin_init?
sorry for english, here is example
PHP Code:
plugin_init()
{
register_clcmd("test""wow")
new 
Someeeething[][] {
"something1",
"something2",
"something3"
}
}

public 
wow(id)
{
show_motd(id,.....)

And I dont know how to include this 3 something in motd when someone type test
__________________
Artifact is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-24-2012 , 07:13   Re: Motd help
Reply With Quote #2

Code:
register_clcmd("test", "wow")
->

Code:
register_clcmd("say test", "wow")
show_motd()

Also what are you trying to do with the line - new Someeeething[][]
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 06-24-2012 , 09:59   Re: Motd help
Reply With Quote #3

Quote:
Originally Posted by Artifact View Post
How to put something in motd when I write this in plugin_init?
sorry for english, here is example
PHP Code:
plugin_init()
{
register_clcmd("test""wow")
new 
Someeeething[][] {
"something1",
"something2",
"something3"
}
}

public 
wow(id)
{
show_motd(id,.....)

And I dont know how to include this 3 something in motd when someone type test
I'm not sure about this, as I never tried the motd....
anyway I will give it a shot:
Code:
new Someeeething[][] = { "something1", "something2", "something3" } public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say test", "wow") } public wow(id) {     new xD[128]     format(xD, charsmax(xD), "%s %s %s", Someeeething[0], Someeeething[1], Someeeething[2])      // Fixed thanks to <Veco>     show_motd(id, xD, "TEST") }
EDIT: I's not working, it only shows two characters.
EDIT2: Fixed, thanks to <Veco>!
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 06-24-2012 at 10:27.
pokemonmaster is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-24-2012 , 10:07   Re: Motd help
Reply With Quote #4

Code:
register_clcmd("test", "wow")

->

Code:
register_clcmd("say test", "wow")
or
Code:
register_clcmd("say_team test", "wow")
__________________
Pawn ? Useless
Aooka is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-24-2012 , 10:11   Re: Motd help
Reply With Quote #5

Quote:
Originally Posted by Aooka View Post
Code:
register_clcmd("test", "wow")

->

Code:
register_clcmd("say test", "wow")
or
Code:
register_clcmd("say_team test", "wow")
Yes, thanks for the echo ;) say team not really necessary for testing purposes.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 06-24-2012 , 10:15   Re: Motd help
Reply With Quote #6

People! He want to put the Someeeething[][] stings from [0] to [2] and then put it in the motd!
My method didn't work, but it was worth to try.
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 06-24-2012 at 10:16.
pokemonmaster is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-24-2012 , 10:17   Re: Motd help
Reply With Quote #7

@Hornet: yes but it's to show him we can do that too
__________________
Pawn ? Useless
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-24-2012 , 10:21   Re: Motd help
Reply With Quote #8

charsmax(xD)
__________________
<VeCo> is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-24-2012 , 10:30   Re: Motd help
Reply With Quote #9

Quote:
Originally Posted by pokemonmaster View Post
EDIT: I's not working, it only shows two characters.
EDIT2: Fixed, thanks to <Veco>!
Yes, you must specify the size of the output array.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 06-24-2012 , 18:40   Re: Motd help
Reply With Quote #10

Quote:
Originally Posted by hornet View Post
Code:
register_clcmd("test", "wow")
->

Code:
register_clcmd("say test", "wow")


Also what are you trying to do with the line - new Someeeething[][]
Wow, look, wait, guys, I dont know what is now with this forum, I dont need to someone type in chat, ok, I know how to do that, I just need to plugin add all of this ''something'' in motd, and when I want to edit plugin, or to add more ''something''s, plugin refresh motd and write new things...

Whatever I want something like swear filter plugin, when someone type /swear in chat plugin gives him motd with all unallowed words. I want something like this..
__________________
Artifact is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:07.


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