Raised This Month: $32 Target: $400
 8% 

[EASY] How to make something for admin only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
New and Clueless
Senior Member
Join Date: Dec 2015
Old 01-07-2016 , 15:56   [EASY] How to make something for admin only
Reply With Quote #1

can you make this for admin only? thanks!

Spoiler

Last edited by New and Clueless; 01-07-2016 at 15:58.
New and Clueless is offline
aSior
Member
Join Date: Jan 2016
Old 01-07-2016 , 17:01   Re: [EASY] How to make something for admin only
Reply With Quote #2

Which admin flag you want it to be on?
aSior is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 01-08-2016 , 02:57   Re: [EASY] How to make something for admin only
Reply With Quote #3

Quote:
Originally Posted by aSior View Post
Which admin flag you want it to be on?
i know how to change a flag , id like it on 'u' please, thanks man.
New and Clueless is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-08-2016 , 07:02   Re: [EASY] How to make something for admin only
Reply With Quote #4

Simply add the following where all the checks are (you can easily spot them):

PHP Code:
if(!(get_user_flags(attacker) & ADMIN_MENU)) return HAM_IGNORED

Last edited by OciXCrom; 01-08-2016 at 07:02.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
aSior
Member
Join Date: Jan 2016
Old 01-08-2016 , 09:32   Re: [EASY] How to make something for admin only
Reply With Quote #5

You can add

#define FLAG ADMIN_LEVEL_H
in .sma file, then you just need to compile it ;)

Last edited by aSior; 01-08-2016 at 09:34.
aSior is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-08-2016 , 10:02   Re: [EASY] How to make something for admin only
Reply With Quote #6

Quote:
Originally Posted by aSior View Post
You can add

#define FLAG ADMIN_LEVEL_H
in .sma file, then you just need to compile it ;)
You sure that that's the only thing he needs to do?
OciXCrom is offline
Send a message via Skype™ to OciXCrom
New and Clueless
Senior Member
Join Date: Dec 2015
Old 01-08-2016 , 10:19   Re: [EASY] How to make something for admin only
Reply With Quote #7

Quote:
Originally Posted by OciXCrom View Post
You sure that that's the only thing he needs to do?
could you do it if you dont mind? then ill check and compare to see what you did
New and Clueless is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-08-2016 , 13:48   Re: [EASY] How to make something for admin only
Reply With Quote #8

I don't have to check it, I know that it wouldn't do anything. Add the code that I told you to, you don't need anything else.

Last edited by OciXCrom; 01-08-2016 at 13:49.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-08-2016 , 17:41   Re: [EASY] How to make something for admin only
Reply With Quote #9

Add under OnTakeDamagePost:

if(!is_user_admin(attacker)) return HAM_IGNORED
siriusmd99 is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 01-09-2016 , 12:30   Re: [EASY] How to make something for admin only
Reply With Quote #10

Quote:
Originally Posted by siriusmd99 View Post
Add under OnTakeDamagePost:

if(!is_user_admin(attacker)) return HAM_IGNORED
your one had error compile, didnt recognise your line

Quote:
Originally Posted by OciXCrom View Post
Simply add the following where all the checks are (you can easily spot them):

PHP Code:
if(!(get_user_flags(attacker) & ADMIN_MENU)) return HAM_IGNORED
your one work perfect. but i didnt know where a check was so i was asking if you could put it in the code, and i would then look at the code i posted and the one you would post to see what you changed in it, so next time i would know what a check is
New and Clueless 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 12:39.


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