SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/07/2019, 08:35 AM   #1
alvin6
Little Clucker
 
Join Date: Mar 2017
Posts: 37
Reputation: 2
Thumbs up help with high admin ranks

hey im trying to find a way to do that a lower admin rank should not be able to ban/kick higher admins but i cant find
lets take example of mute command and for example i dont want it to be worked on rcon admin

CODE:
PHP Code:
CMD:mute playeridparams[] )
{
    if ( 
PlayerInfoplayerid ][ Admin ] < ) return SendClientMessageplayerid, -1""RED"ERROR: "GREY"You are not authorized to use this command!" );
    new 
giveidreason[50], str[128], minutes;
    if ( 
sscanf params"uds[50]"giveidminutesreason )) return SendClientMessageplayerid0x6FFF00FF,"{F07F1D}USAGE: {BBFF00}/mute <ID> <Minutes> <Reason>");
    if ( 
giveid == INVALID_PLAYER_ID ) return SendClientMessageplayerid, -1""RED"ERROR: "GREY"Invalid player ID!" );
        
format(strsizeof(str), ""RED"Admin %s "RED"has muted %s for %d minutes "RED": %s"GetNameplayerid ), GetNamegiveid ), minutesreason  );

    
SendClientMessageToAll0xB0C4DEFFstr );
    new 
calc =  minutes*60;
    
PlayerInfogiveid ][ Muted ] = calc;
    
PlayerPlaySoundgiveid10950.00.00.0 );
    
GameTextForPlayergiveid"~r~MUTED!"3000);
    return 
1;

alvin6 is offline   Reply With Quote
Old 14/07/2019, 08:36 AM   #2
ShadowMortar
Big Clucker
 
ShadowMortar's Avatar
 
Join Date: Jul 2016
Location: Croatia
Posts: 83
Reputation: 10
Default Re: help with high admin ranks

PHP Code:
if( PlayerInfogiveid ] [ Admin] > PlayerInfoplayerid ] [ Admin ] ) return SendClientMessageplayerid, -1"{ff0000}Error:{ffffff} You can not use that command on higher level admins!" ); 
ShadowMortar is online now   Reply With Quote
Old 14/07/2019, 08:38 AM   #3
alvin6
Little Clucker
 
Join Date: Mar 2017
Posts: 37
Reputation: 2
Default Re: help with high admin ranks

Quote:
Originally Posted by ShadowMortar View Post
PHP Code:
if( PlayerInfogiveid ] [ Admin] > PlayerInfoplayerid ] [ Admin ] ) return SendClientMessageplayerid, -1"{ff0000}Error:{ffffff} You can not use that command on higher level admins!" ); 
Thank you for your help
alvin6 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
What are you admin ranks? TheMallard General 7 27/04/2016 12:13 PM
Admin ranks Acres Scripting Help 5 05/01/2014 12:01 PM
Ranks and admin help Noles2197 Scripting Help 3 15/01/2013 09:33 PM
Admin Ranks MechaTech Scripting Help 11 24/05/2012 08:46 PM
Admin Ranks? sanplayer Scripting Help 10 09/10/2011 05:59 PM


All times are GMT. The time now is 06:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.