Author Topic: Simple VIP Script  (Read 6340 times)

Just a script I pulled together (mainly for learning about databasing) this past few days.
Simple really:

/setViptag [TAG] - Sets the VIP tag. If none is defined then it will default to "\c4[VIP]"
/addVip [BLID] - Add a VIP
(Self) Output Event checkVIP - Checks if a user is a VIP or not
Input event onVipTrue - Called if checkVIP returns true
Input event onVipFalse - Called if checkVIP returns false

Special thanks to visolator for helping me though my handicapation.

Download Now

Please for any bugs, errors etc go to this projects github page
GitHub
« Last Edit: March 23, 2014, 03:35:20 PM by RarwMuffinz »


Working on it. Will update link when im done


Cool! Does VIP carry between sessions? As in, if I join, get VIP, and rejoin, will I still have VIP? If so, will I still have VIP if the server restarts?

When you add a VIP the players BLID gets stored in "config/server/viplist.cs". So yes
Also
Just a script I pulled together (mainly for learning about databasing)

omg I've been looking for this!

Does it give you a tag?

I would love you so much if you gave it white "[", pink "VIP" and white "].

Added VIP tags "\c4[VIP]"
« Last Edit: March 21, 2014, 08:23:27 PM by RarwMuffinz »

AGH! Found bugs! Fixing
All fixed :D
« Last Edit: March 21, 2014, 09:27:53 PM by RarwMuffinz »

Cool! Does VIP carry between sessions? As in, if I join, get VIP, and rejoin, will I still have VIP? If so, will I still have VIP if the server restarts?
It checks once you connect. (It checks for admin status)

By looking at the code, I see a lot of echoes..
« Last Edit: March 21, 2014, 09:32:41 PM by Advanced Bot »

I tried to remove alot. I didnt think anyone would care to look in the console but ill remove them

thank you! the one that marble man gave mne was so ###### up.

Removed unnecessary echos. If anyone wants new features just throw them at me

I already see a "memory leak".

In your checkVip function, you are returning before you close the file object. Also, storing long, 1 lined strings to a variable can potentially cause problems. Just a heads up.

I haven't come across any errors myself. Personally I barely ever use Return Blah; unless it's the only option. I think viso added those, I'll look into it tomorrow morning.