Raised This Month: $51 Target: $400
 12% 

(Request) [JAILBREAK] Voice Permissions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NarutoAzores
Junior Member
Join Date: Sep 2018
Old 06-09-2022 , 05:39   (Request) [JAILBREAK] Voice Permissions
Reply With Quote #1

I would like how can I change the admin voice to a variable. example below of what I want:

Remove:
Code:
#define ADMIN_VOICE ADMIN_MENU
!access(sender, ADMIN_VOICE)
ADD:
Code:
g_fvault_privilege[id] == 3 // boss
g_fvault_privilege[id] == 2 // admin
g_fvault_privilege[id] == 1 // vip
g_fvault_privilege[id] == 0 // normal player (cant talk)
I wanted to know what the rule I make to add this
I'm sorry if I'm saying something wrong


Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
 
#define ADMIN_VOICE ADMIN_MENU
 
new bool:g_connected[33];
new g_max_clients;
 
public plugin_init()
{
    register_plugin("No Terrorist Voice", "0.1", "Exolent");
 
    register_forward(FM_Voice_SetClientListening, "FwdSetVoice");
 
    g_max_clients = get_maxplayers();
}
 
public client_putinserver(client)
{
    g_connected[client] = true;
}
 
public client_disconnect(client)
{
    g_connected[client] = false;
}
 
public FwdSetVoice(receiver, sender, bool:listen)
{
    if( !(1 <= receiver <= g_max_clients)
    || !g_connected[receiver]
    || !(1 <= sender <= g_max_clients)
    || !g_connected[sender] ) return FMRES_IGNORED;
 
    new CsTeams:team = cs_get_user_team(sender);
    if( (team == CS_TEAM_T || team == CS_TEAM_CT && !is_user_alive(sender)) && !access(sender, ADMIN_VOICE) )
    {
        engfunc(EngFunc_SetClientListening, receiver, sender, 0);
        return FMRES_SUPERCEDE;
    }
 
    return FMRES_IGNORED;
}

Last edited by NarutoAzores; 06-09-2022 at 07:59.
NarutoAzores is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-09-2022 , 12:37   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #2

So you wann make check for 3 access? And block the voice from normal players?
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 06-09-2022 at 12:37.
Supremache is offline
NarutoAzores
Junior Member
Join Date: Sep 2018
Old 06-09-2022 , 14:41   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #3

Quote:
Originally Posted by Supremache View Post
So you wann make check for 3 access? And block the voice from normal players?
Yes I want to give access to the 3, I don't know if it's a good idea to block the normal user because the normal user if he is in ct has the permission to speak. If you see in the plugin, the CTs can talk to their team and to the T.

I was saying that on my server the normal player is g_fvault_privilege[id] == 0

Last edited by NarutoAzores; 06-09-2022 at 14:51.
NarutoAzores is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-09-2022 , 15:29   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #4

Quote:
Originally Posted by NarutoAzores View Post
Yes I want to give access to the 3, I don't know if it's a good idea to block the normal user because the normal user if he is in ct has the permission to speak. If you see in the plugin, the CTs can talk to their team and to the T.

I was saying that on my server the normal player is g_fvault_privilege[id] == 0
Where is the native of this "g_fvault_privilege[id]"
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
NarutoAzores
Junior Member
Join Date: Sep 2018
Old 06-09-2022 , 16:04   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #5

Quote:
Originally Posted by Supremache View Post
Where is the native of this "g_fvault_privilege[id]"
Not added to plugin yet
I was wondering how I could add it here using this.

new g_fvault_privilege[MAX_PLAYERS]
NarutoAzores is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-09-2022 , 16:15   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #6

Quote:
Originally Posted by NarutoAzores View Post
Not added to plugin yet
I was wondering how I could add it here using this.

new g_fvault_privilege[MAX_PLAYERS]
it's not possible, Attach the plugin that have this variable "new g_fvault_privilege[MAX_PLAYERS]"
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 06-10-2022 , 22:50   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #7

Just replace !access(sender, ADMIN_VOICE) with g_fvault_privilege[id] and that should do the job, considering that you've already tagged g_fvault_privilege to all players.
__________________
bigdaddy424 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-11-2022 , 16:35   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #8

Quote:
Originally Posted by bigdaddy424 View Post
Just replace !access(sender, ADMIN_VOICE) with g_fvault_privilege[id] and that should do the job, considering that you've already tagged g_fvault_privilege to all players.
How will this work?
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 06-11-2022 , 18:34   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #9

Quote:
Originally Posted by Supremache View Post
How will this work?
He's not showing how he set up g_fvault_privilege[] so i dont care.
__________________
bigdaddy424 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-11-2022 , 19:04   Re: (Request) [JAILBREAK] Voice Permissions
Reply With Quote #10

Quote:
Originally Posted by bigdaddy424 View Post
He's not showing how he set up g_fvault_privilege[] so i dont care.
This is what I was talking about, this variable "g_fvault_privilege[]" was created on another plugin so I said to use it in that voice plugin, I need to create a native
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode