Dynamic MOTD
Can someone explain how i can make dynamic motd messages?
I mean like when someones rank is in motd and it changes, to let it change in motd to. |
Re: Dynamic MOTD
All you do is create the motd in a string var and display it.
|
Re: Dynamic MOTD
could you give an example?
|
Re: Dynamic MOTD
Quote:
UPDATE_Hud() function. It formats a hud message, but all you need to do is use HTML and show_motd. |
Re: Dynamic MOTD
i checked your code, but i still don't understand how i do it.
Do i make a seperate MOTD or do i code it into the plugin? |
Re: Dynamic MOTD
You can do it either way, but if you're doing it in-plugin, use that method. What you're doing is basically formatting the same string, but formatting it from the end of where you previously formatted, which is what the iLen is for, basically a place holder.
If you want more info on MOTD and rankings, you can check out the stats plugins like JumpStats (Exolent) or Bullet Damage Ranking (schmurgel1983). |
Re: Dynamic MOTD
I think i understand it, but is it possible to use if and else statements in there, like this one.
PHP Code:
|
Re: Dynamic MOTD
Yeah, you can, but you're better off just using the ? : operators.
|
Re: Dynamic MOTD
i don't know how ? : operators work.
Could you point out a tutorial about that or explain it a bit, i looked at funcwiki but could'nt find something like that. I found this in the pawn language guide but i don't understand a thing about it. Code:
? : e1 ? e2 : e3 |
Re: Dynamic MOTD
Quote:
Simplest way to put it: ( condition ) ? return value if true : return value if false PHP Code:
PHP Code:
|
All times are GMT -4. The time now is 00:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.