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

Help on making a hero admin-only


Post New Thread Reply   
 
Thread Tools Display Modes
piton
Junior Member
Join Date: May 2007
Location: Lisbon, Portugal
Old 05-18-2007 , 13:21   Re: Help on making a hero admin-only
Reply With Quote #31

lol how do i compile it im new i just no how to install a hero
piton is offline
Xel0z
Senior Member
Join Date: Apr 2006
Location: Netherlands
Old 05-18-2007 , 13:35   Re: Help on making a hero admin-only
Reply With Quote #32

Well since I dont really fancy explaining, I just give u the amxx.. I hope u do know what to do with the cvars and so on?
Attached Files
File Type: amxx sh_probe.amxx (6.7 KB, 100 views)
__________________
Heroes: TESS-One Working on: Grit (Fixing bugs)
Xel0z is offline
Send a message via MSN to Xel0z
StevnJ9971
Senior Member
Join Date: Sep 2006
Location: California
Old 05-18-2007 , 16:29   Re: Help on making a hero admin-only
Reply With Quote #33

You guys, this is not relating to this topic at all. Vittu, can you close this thread please? My issue has been resolved (which is what this thread was about).
__________________
[IMG]http://img208.**************/img208/1706/userbar262772da7.gif[/IMG]
StevnJ9971 is offline
Send a message via AIM to StevnJ9971
MagusCoronia
Junior Member
Join Date: Jul 2007
Old 07-17-2007 , 10:35   Re: Help on making a hero admin-only
Reply With Quote #34

Ok imk trying to follow what you did, to get the Admin only, but with Exodus, the thing is im not sure its done right...
The admin check works fine It wont let you select it ... problem is, im an admin and it wont let ME even select it i got full admin too abcdefghijklmnopqrstu so there shouldnt be any reason i dont have it,
This is the section of code "puplic exodus_init" and the Admin check thing.
Code:
public exodus_init()
{
    // First Argument is an id
    new temp[6]
    read_argv(1,temp,5)
    new id = str_to_num(temp)

    // 2nd Argument is 0 or 1 depending on whether the id has the hero
    read_argv(2,temp,5)
    new hasPowers = str_to_num(temp)

    //Clear out any stale tasks
    remove_task(id)

    if ( !hasPowers && g_hasExodus[id] && is_user_connected(id) ) {
        if ( g_inSearch[id] ) release(id)
    }

    g_hasExodus[id] = (hasPowers != 0)
    
   if(g_hasExodus[id] && is_user_connected(id)) {
      HERO_admincheck(id)
   }
}
public HERO_admincheck(id) {
   new accessLevel[10] = ADMIN_LEVEL_A
   if ( g_hasExodus[id] &&  !(get_user_flags(id)&read_flags(accessLevel)) ) {
      client_print(id, print_chat, "[SH](%s) **Admin Only** You are not authorized to use this hero", g_heroName)
      g_hasExodus[id] = false
      client_cmd(id, "say drop %s", g_heroName)
   }
}

Last edited by MagusCoronia; 07-17-2007 at 12:29.
MagusCoronia is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-17-2007 , 12:45   Re: Help on making a hero admin-only
Reply With Quote #35

because you are setting accessLevel[10] to ADMIN_LEVEL_A, ADMIN_LEVEL_A is not a string, you need to set it like this:
Code:
accessLevel[10] = "a";
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
&|Spartan|{IV}-Leader-&
Junior Member
Join Date: Aug 2007
Location: Washington, Seatle
Old 08-15-2007 , 08:26   Re: Help on making a hero admin-only
Reply With Quote #36

I am new at this so im a big noobie.. I have on question do I put the code with all the high lights in the .sma file of the hero and thats it? Don't judge me im new at this
__________________
Help me = Good Karma I am 45% addicted to Counterstrike. What about you?
&|Spartan|{IV}-Leader-& is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 08-15-2007 , 22:04   Re: Help on making a hero admin-only
Reply With Quote #37

the above example is fine just change
Code:
new accessLevel[10] = ADMIN_LEVEL_A
into
Code:
accessLevel[10] = "a";
or whatever letter you want it to be, if you are asking something else, you need to read the amxmodx wiki. search if you dont know what I am talking about.
__________________
DO NOT PM me about avp mod.
Rolnaaba 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 18:05.


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