Hello There, Guest! Login or Register


In-game access rights
#1
In the new gamemode, everything will be based on access rights (which are per-player) rather than the current "admin"/"moderator" way. This allows us to give any kind of rights to anyone who we thing is worthy to have these specific rights. Meaning admin rights who can't do everything a loyal player can!



[table]
[tr]
  [td]Right ID     [/td]
  [td]Right Tag              [/td]
  [td]Description[/td]
  [td] [/td]
[/tr]
[tr]
  [td]1[/td]
  [td]CAN_JOIN[/td]
  [td]Indicates that this player is allowed to join the server.       [/td]
  [td][all][/td]
[/tr]
[/table]



The tags can be used in server-side scripts (access related stuff shouldn't occur in client-side scripts anyway) using the following syntax. All tags are automatically registered using the LVP Core and have the ID associated with the right, as described above. It does not matter whether you use the ID or the enum-value.

echoMessage ( "Value of the CAN_JOIN right is: " .. LVP_RIGHTS.CAN_JOIN )

Mind the dot in the middle of the right-value. When you use it in the LVP C++ Core, whatever you might be doing there in the first place, that dot has to become another underscore so the define would be LVP_RIGHTS_CAN_JOIN, carrying the same value as the LUA value.

Coloured Circle value's:
[all] Indicates that all players get this right by default
Reply
#2
Would it be a good idea to give these rights certain short notations such as, in this case, CAN_JOIN or something? Imho that would be making stuff a lot clearer.
Reply
#3
(01-23-2008, 09:09 PM)Badeend link Wrote: Would it be a good idea to give these rights certain short notations such as, in this case, CAN_JOIN or something? Imho that would be making stuff a lot clearer.

Ideally yes, but unfortunately LUA does not support defines like Pawn does. Enums would be ideal, but that would have to be programmed in the Core itself. Syntax would become like LVP_RIGHT_* and it would be used internally as well. I'll think about it.

Edit: Has been implented. Syntax described in the first post.
Reply
#4
Current right tag list: (more to be added later)
Code:
CAN_ANNOUNCE
CAN_BAN
CAN_BANK
CAN_BANK_REMOTE
CAN_BORROW
CAN_BUY_PROPERTY
CAN_BUY_WEAPON
CAN_CALL
CAN_CARDIVE
CAN_CARDIVE_OTHER
CAN_CARTELEPORT
CAN_CHANGE_PROPERTY
CAN_CHAT
CAN_CHAT_ADMIN
CAN_CHAT_GANG
CAN_CHAT_REGULAR
CAN_COUNTDOWN
CAN_CREATE_GANG
CAN_CREATE_PROPERTY
CAN_CREATE_VEHICLE
CAN_DIVE
CAN_ENTER_ADMINAREA
CAN_ENTER_ADMINVEHICLE
CAN_ENTER_INTERIOR
CAN_FETCH
CAN_GET_PLAYERINFO
CAN_GIVE_WEAPON
CAN_GIVECASH
CAN_HIDE
CAN_IRC_CREW
CAN_IRC_DEV
CAN_IRC_MANAGEMENT
CAN_IRC_VIP
CAN_JAIL
CAN_JOIN_GANG
CAN_JOIN_MINIGAME
CAN_JOIN_WORLD
CAN_KICK
CAN_KILL
CAN_LOGIN
CAN_MOD_VEHICLE
CAN_MUTE
CAN_NUKE
CAN_PAUSE
CAN_PICKUP_ARMOUR
CAN_PICKUP_HEALTH
CAN_PM
CAN_RAMP
CAN_REPORT
CAN_RESPAWN
CAN_SAVELOC
CAN_SET_ARMOUR
CAN_SET_CARHEALTH
CAN_SET_HEALTH
CAN_SET_MAIN_GRAVITY
CAN_SET_MAIN_TIME
CAN_SET_MAIN_WEATHER
CAN_SET_PLAYERCOLOUR
CAN_SET_SKIN
CAN_SET_WEATHER
CAN_SET_WORLD_GRAVITY
CAN_SET_WORLD_GRAVITY
CAN_SET_WORLD_TIME
CAN_SHOWMESSAGE
CAN_SPECTATE
CAN_SUICIDE
CAN_TAXI
CAN_TELEPORT
CAN_UNJAIL
CAN_WITHDRAW
Reply
#5
Do you really want to go that "basic", to deny/allow people to chat/bank/buy weapons?

Or, maybe a better question:
What are the default rights a new player should get?
Reply
#6
Well the chat right would be something with mutes, right? So instead of another var for mute, just turn their chat 'off', and send them a message.

The bank is a little extreme, but I guess a lot of these won't be used too much.
Reply
#7
I just want every right to be controllable, even if we'll (almost) never use it. Commands such as help and other player-specific text-only commands are the only things (maybe some others that i haven't thought of yet) that don't really need to be controlled.
Reply