• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenMP/SAMP version of Jenkins EssentialsX Minercaft Plugin?
#1
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?
  Reply
#2
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
  Reply
#3
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
  Reply
#4
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:promotefalse); // Disable this command for everyone.
Group_SetCommand(gAdminGroupYCMD:promotetrue); // 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.
  Reply
#5
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.
  Reply
#6
(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.
  Reply
#7
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.
  Reply
#8
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.
  Reply
#9
(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
  Reply
#10
(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?
  Reply
#11
(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.
  Reply
#12
His suggestion literally is a library. A library just as prone to breaking as any other.
  Reply


Forum Jump: