General > Developers Corner
Premium Features..
Mindless:
Right, i'm here seeking help and getting started in coding a premium system or features for players. Basically I need stuff like ex:
- Premium Tag
- Premium Chat (Only talk between premium members (# <msg)
- Annoucements on connection (First a message will appear in center of screen saying: "Welcome <name>" then after fifteen seconds it will say "Welcome back, <name>" to everyone.
- Extra Props = 100 more.
How would I start off making a system like this - i'm not a perfect coder and I want to know if its possible, and if anyone is willing to help. Yes this will Ulysses group system. But I would like commands such as:
ulx premium [name] [days]
Then after those 30 days it would expire and they wouldn't get it.
JamminR:
Well, the best starting place to look for me was at existing code.
ULX already does the 'basic' two features below.
"premium' chat - Look for ULX's chat code, specifically function ulx.asay I think.
Typing ulx asay <text> in console or @ <text> in chat will only type to those ULX groups who have operator/admin or superadmin (or inherit those)
Announcements - though we don't have a welcome back, upon join, ULX does offer a 'welcome' message.
I'm pretty sure it uses the PlayerSpawn hook.
As for the others, there are several chat tag discussions (and even a release I think) on the forum, and URS might be a good place to look at how he originally planned to go past prop limits.
Mindless:
--- Quote from: JamminR on February 07, 2013, 02:30:39 PM ---Well, the best starting place to look for me was at existing code.
ULX already does the 'basic' two features below.
"premium' chat - Look for ULX's chat code, specifically function ulx.asay I think.
Typing ulx asay <text> in console or @ <text> in chat will only type to those ULX groups who have operator/admin or superadmin (or inherit those)
Announcements - though we don't have a welcome back, upon join, ULX does offer a 'welcome' message.
I'm pretty sure it uses the PlayerSpawn hook.
As for the others, there are several chat tag discussions (and even a release I think) on the forum, and URS might be a good place to look at how he originally planned to go past prop limits.
--- End quote ---
Where can I find the thing for ulx asay?
Bite That Apple:
What do you mean by "find" ulx asay. Do you mean like how to use it, if that's the case than just type !menu or !xgui and go to Chat and ulx asay to use it. If you were talking about like the code to it, I saw it recently after looking through almost all of the ulx code (I don't think I saw it in ulib, I know for a fact it's not in there actually.), so I could possibly find it but I think it would be better and faster if Sticky, JamminR, or Megiddo to help you with that. :p
Edit:
lol right before I was about to turn off both of my computers, I was like... wait why would I even suspect ulx asay would be in ulib, ulib is just for UCL..
Another thing I want to add is this too:
--- Quote from: Mindless on February 07, 2013, 09:51:58 AM ---- Premium Tag
- Premium Chat (Only talk between premium members (# <msg)
- Annoucements on connection (First a message will appear in center of screen saying: "Welcome <name>" then after fifteen seconds it will say "Welcome back, <name>" to everyone.
- Extra Props = 100 more.
--- End quote ---
This is very much possible, and I think you could do it yourself, seeing as "you did create your very own" player join/leave and !join script (which i fixed :p), it wouldn't be that hard to do, just a lot of if statements in my head... ugh... if statements, anyways.
--- Quote from: Mindless on February 07, 2013, 09:51:58 AM ---ulx premium [name] [days]
Then after those 30 days it would expire and they wouldn't get it.
--- End quote ---
This is the part that I feel a lot of people would get stuck at, because I mean I personally don't know how to do this, I would just try to find the banning script, and re modify it to this.
LuaTenshi:
--- Quote from: chaos13125 on February 08, 2013, 01:25:37 AM ---This is the part that I feel a lot of people would get stuck at, because I mean I personally don't know how to do this, I would just try to find the banning script, and re modify it to this.
--- End quote ---
You could save a list of users and the time they have left for premium in a text file, or you can even save them in the sv.db using SetPData and GetPData. (You will probably have to use timers.)
Navigation
[0] Message Index
[#] Next page
Go to full version