Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP General Discussions OpenMP/SAMP version of Jenkins EssentialsX Minercaft Plugin?

 
  • 0 Vote(s) - 0 Average
OpenMP/SAMP version of Jenkins EssentialsX Minercaft Plugin?
Dev86
Offline

Burgershot Member
Posts: 18
Threads: 7
Joined: Apr 2019
Reputation: 0
#1
2019-04-22, 03:36 PM
If you play minecraft and know how servers/plugins works there, you might be familiar with EssentialsX.

Ok so basically, EssentialsX is just a bunch of very useful commands (which already includes moderation/administration commands) in one script/minecraft plugin. Many minecraft servers use this. It has alot of commands such as /nick (where you'd have a nickname that can be colorized), /me (you know what this is), and many more. Not just that but they also have in-plugin features such as an economy system and stuff. And they assign these commands to specific ranks so that not every rank can use it. You can read more at their website. (not linking it, but you can search it up on google.)

I started off trying to remake this thing, but only the necessary commands for SAMP or Open MP. this script of mine that i'm making (could) help new scripters. It would work like this:
there would be 2 parts of this whole script, the ranks, and the individual commands and features.

So for the first part of the script, the "ranks" part, makes it easy to assign commands for people.

lets say for example you have want a rank called "monstaX" (yikes)


so most servers would make a variable like: pInfo[playerid][pRank] = "monstaX"
and under every command you make you need to add if statements such as: if(pInfo[playerid][pRank] == "monstaX") {


but in this script im developing, you create ranks within the script (or a config, idk might make a config.ini file or similar ye xzcmz)
and assign commands/features to the ranks you made within the script/config aswell.

lets say for example you made the monstaX rank, you assign commands within a config (im not sure how im gonna make it yet so these are just assumptions). Like so:

note(again): this COULD be the config syntax, but im not sure, it would most probably change and be very different from what i type under here, it is just a visualization of what i am trying to say.

Code:
monstaX:
   permissions:
       - /me
       - /pay
       - /feed

again this is just a visualization.

so for the second part, the commands and features, this is where other scripters can do their part.

so here, lets say we have this command:
Code:
CMD:ah(playerid, params[]) return callcmd::adminhelp(playerid, params);
CMD:ahelp(playerid, params[]) return callcmd::adminhelp(playerid, params);
CMD:adminhelp(playerid, params[])
{
if(!PlayerInfo[playerid][pAdmin] && !IsPlayerAdmin(playerid) && !PlayerInfo[playerid][pFormerAdmin])
{
   return SCM(playerid, COLOR_RED, "[!]{ffffff} You are not authorized to use this command.");
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SCM(playerid, COLOR_WHITE, "{000000}Secret Admin:{FFFFFF} /a, /skick, /sban, /sjail, /pinfo, /spec, /reports, /admins, /flag, /removeflag");
SCM(playerid, COLOR_WHITE, "{000000}Secret Admin:{FFFFFF} /ocheck, /oflag, /listflagged /(am)egaphone /listflags, /check, /dm");
}
if(PlayerInfo[playerid][pAdmin] >= 2)
{
SCM(playerid, COLOR_LIGHTGREEN, "[JA]{FFFFFF} /aduty, /adminname, /kick, /ban, /warn, /slap, /ar, /tr, /rr, /cr, /getip, /iplookup, /ogetip, /setint, /setvw");
SCM(playerid, COLOR_LIGHTGREEN, "[JA]{FFFFFF} /setskin, /revive, /heject, /goto, /gethere, /gotocar, /getcar, /gotocoords, /gotoint, /listen, /jetpack, /sendto");
SCM(playerid, COLOR_LIGHTGR---...........


so instead of having this, and manually having to put similar if statements for every new rank you want:
Code:
if(!PlayerInfo[playerid][pAdmin] && !IsPlayerAdmin(playerid) && !PlayerInfo[playerid][pFormerAdmin])
{
  return SCM(playerid, COLOR_RED, "[!]{ffffff} You are not authorized to use this command.");
}

the script changes it to this:

Code:
if(!xPermissions[PlayerInfo[playerid][pRank]][ahelp])
{
  return SCM(playerid, COLOR_RED, "[!]{ffffff} You are not authorized to use this command.");
}

more simple, right? 

And this variable i made is what is gonna be assigned for each rank.

You can ask questions and clarrifications. I've wrote this very late and i'm tired.
-

Question: If i release this script, will you use it?
Reeves
Offline

Burgershot Member
Posts: 3
Threads: 0
Joined: Apr 2019
Reputation: 0
#2
2019-04-22, 06:30 PM
pretty sure i know a couple of scripts that use a flag system so "admin flag" then it just checks if you can use admin command "developer flag" can use dev cmds but its an interesting concept to user it from a players point of view i guess
nize
Offline

hakdog
Posts: 6
Threads: 1
Joined: Apr 2019
Reputation: 0
Location: Philippines
#3
2019-04-23, 02:14 AM (This post was last modified: 2019-04-23, 02:16 AM by nize.)
Pawn.CMD, the command processor I believe you are using right now, does have a flag system

https://forum.sa-mp.com/showthread.php?t=647389
https://github.com/urShadow/Pawn.CMD
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#4
2019-04-23, 01:29 PM (This post was last modified: 2019-04-23, 01:29 PM by Y_Less.)
This is what y_commands and y_groups has done for years. Never mind a single flag, or even excess code within a command:

PHP Code:
Group_SetCommandGlobal(YCMD:promote, false); // Disable this command for everyone.
Group_SetCommand(gAdminGroup, YCMD:promote, true); // Enable it for admins. 

No need for checking in the command at all, and a great deal more flexibility with that.

It doesn't actually read those permissions from a file currently, but doing so is trivial, since they are already dynamic.
Cada
Offline

Burgershot Member
Posts: 11
Threads: 2
Joined: Apr 2019
Reputation: 0
#5
2019-04-23, 03:18 PM (This post was last modified: 2019-04-23, 03:19 PM by Cada.)
i think it`s good idea.

in minecraft, most server have not developed their plugins like teleporter something themselves, but using uploaded plugins.
it makes many people can open their server easily even though they don`t know about scripting.

if this applied at OpenMP, more people can come into contact with OpenMP easily like minecraft.
Gravityfalls
Offline

Burgershot Member
Posts: 105
Threads: 7
Joined: Apr 2019
Reputation: 2
#6
2019-04-23, 03:58 PM
(2019-04-23, 03:18 PM)Cada Wrote: i think it`s good idea.

in minecraft, most server have not developed their plugins like teleporter something themselves, but using uploaded plugins.
it makes many people can open their server easily even though they don`t know about scripting.

if this applied at OpenMP, more people can come into contact with OpenMP easily like minecraft.

Both of the mods are entirely different, don't compare them.
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#7
2019-04-23, 04:08 PM
And we have that - we have includes/modes/plugins already! You're saying the ability to download and install things is a good idea - we agree, that's why its existed for 10+ years.
Expert*
Offline

Burgershot Member
Posts: 61
Threads: 2
Joined: Apr 2019
Reputation: 4
#8
2019-04-27, 11:15 PM
y_**** is cool, but it's not included by default ( YSI included in open mp when ? ), and for people who will be using this it might be too hard to update it in the future.
Will i be using it ? No, but i can see a lot of people who would, so DO IT.
Dev86
Offline

Burgershot Member
Posts: 18
Threads: 7
Joined: Apr 2019
Reputation: 0
#9
2019-04-28, 01:57 PM
(2019-04-27, 11:15 PM)Expert* Wrote: y_**** is cool, but it's not included by default ( YSI included in open mp when ? ), and for people who will be using this it might be too hard to update it in the future.
Will i be using it ? No, but i can see a lot of people who would, so DO IT.


very inspirational there xd
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#10
2019-04-30, 02:15 PM
(2019-04-27, 11:15 PM)Expert* Wrote: y_**** is cool, but it's not included by default ( YSI included in open mp when ? ), and for people who will be using this it might be too hard to update it in the future.
Will i be using it ? No, but i can see a lot of people who would, so DO IT.

I'm not sure what your point is. This thread was about some large system lots of people can use. One already exists in YSI, of course people don't have to use that, but if they don't use that why would another one be any different? If porting to YSI was too hard, porting to anything else would surely be just as hard?
Expert*
Offline

Burgershot Member
Posts: 61
Threads: 2
Joined: Apr 2019
Reputation: 4
#11
2019-05-01, 08:50 PM (This post was last modified: 2019-05-01, 08:53 PM by Expert*.)
(2019-04-30, 02:15 PM)Y_Less Wrote: I'm not sure what your point is.  This thread was about some large system lots of people can use.  One already exists in YSI, of course people don't have to use that, but if they don't use that why would another one be any different?  If porting to YSI was too hard, porting to anything else would surely be just as hard?

Changes in YSI could brake it, what if i need YSI 4.0 for system A and YSI 6.2 for system B ? ( assuming that sys b is no longer maintained )
People who will be using this more likely than not will be beginners - someone who might not be able to upgrade. His solution is simple, no external library required.

I had some bad experiences with mysql in the past, upgrading from older version to newer just to go back to older one because it was broken on linux. And upgrading to R39, when R40 came out just couple months later with changes that broke my code again.
I just don't like to use someone else's code if i can make my own.
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#12
2019-05-02, 09:15 AM
His suggestion literally is a library. A library just as prone to breaking as any other.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode