AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make so i need a other Access Flag to use it..... (https://forums.alliedmods.net/showthread.php?t=21829)

B-v-G 12-11-2005 13:13

How to make so i need a other Access Flag to use it.....
 
How to do it.

register_concmd("amx_heal","admin_heal",ADMIN _LEVEL_A,"<authid, nick, @team or #userid> <life to give>")


I tried to change ADMIN_LEVEL_A to ADMIN_LEVEL_T(custom level H)
But when i change that, I couldnīt complie it so i gues that was wrong..
What should i change?

Charr 12-11-2005 13:16

You need to define what ADMIN_LEVEL_T is.
Example:
ADMIN_IMMUNITY = (1<<0)

So you would have to define ADMIN_LEVEL_T as (1<<21) [in amxconst], and make sure the user has the "v" flag.

VEN 12-12-2005 03:36

Re: How to make so i need a other Access Flag to use it.....
 
Quote:

Originally Posted by B-v-G
ADMIN_LEVEL_T(custom level H)

custom level H is ADMIN_LEVEL_H

bmann_420 12-12-2005 04:11

amxmod/scripting/include/amxconst.inc

shero_rocks(cool) 12-12-2005 16:41

i know this is really off topic but do you gus have a tutorial for learning to script plz i need to make a plugin

Xanimos 12-12-2005 17:18

If you need it that bad request it. Especially if its going to be complex. Only because if you make it yourself it will most likly have so many bugs you will either give up or not know you have them.

But use the search button there have been a lot of tutorials.

atomic 12-12-2005 19:17

Quote:

Originally Posted by shero_rocks(cool)
i know this is really off topic but do you gus have a tutorial for learning to script plz i need to make a plugin

Why did you post a question about where you could learn how to script in a total useless post that is not the same subject that the........ auhtor decided?

*ran out of air*

B-v-G 12-16-2005 07:33

do i have to change both or one of these:

register_concmd("amx_heal","admin_heal",ADMIN _LEVEL_A,"<authid, nick, @team or #userid> <life to give>")



if (!(get_user_flags(plist[i])&ADMIN_LEVEL_A)&&!ids[plist[i]])



(This was in the same sma)

v3x 12-16-2005 07:43

Code:
if(!cmd_access(id, level, cid, 3))     return PLUGIN_HANDLED;
3 is the number of arguments that the command contains. Say you are using amx_heal..

amx_heal <player> <amount>
  • arg 0 = amx_heal
  • arg 1 = <player>
  • arg 2 = <amount>
So you have 3 in that case because the command itself counts, too.

bmann_420 12-16-2005 16:28

UUU UUUU, I learnd something new today, thankx v3x :D Sorry I dont read the tut's very much too busy, but its nice to get usefull info like that in tidbits every now and then to understand better :D


All times are GMT -4. The time now is 16:07.

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