Raised This Month: $ Target: $400
 0% 

CONCMD, Player Has Immunity...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MiloSx7
Member
Join Date: Oct 2011
Location: Serbia, Nish
Old 10-19-2011 , 11:39   CONCMD, Player Has Immunity...
Reply With Quote #1

PHP Code:
public cmdSetLvL(idlevelcid)
{
    if(!
cmd_access(idlevelcid3))
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
arg1[33]
    new 
arg2[6]
    
    
read_argv(1arg132)
    
read_argv(2arg25)
    
    new 
player cmd_target(idarg1)
    new 
value str_to_num(arg2) - 1
    
   
//My Code Goes Here
    
    
return PLUGIN_HANDLED

How to remove immunity, i mean, how to set that i can execute command on players that have immunity, too
__________________
MiloS
MiloSx7 is offline
Send a message via MSN to MiloSx7
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 10-19-2011 , 16:17   Re: CONCMD, Player Has Immunity...
Reply With Quote #2

Try This:

http://www.amxmodx.org/funcwiki.php?...rget&go=search
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
MiloSx7
Member
Join Date: Oct 2011
Location: Serbia, Nish
Old 10-19-2011 , 16:21   Re: CONCMD, Player Has Immunity...
Reply With Quote #3

I'm not sure how to put that in my code... However its better, cause admins wont be able to give them self the levels, because they would, but i learned something new, at least... Thanks anyway
__________________
MiloS
MiloSx7 is offline
Send a message via MSN to MiloSx7
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-20-2011 , 03:06   Re: CONCMD, Player Has Immunity...
Reply With Quote #4

Quote:
Originally Posted by MiloSx7 View Post
I'm not sure how to put that in my code... However its better, cause admins wont be able to give them self the levels, because they would, but i learned something new, at least... Thanks anyway
Just so you know admins with immunity can use cmds on themselves just not other admins with immunity.
Doc-Holiday is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-20-2011 , 15:00   Re: CONCMD, Player Has Immunity...
Reply With Quote #5

To remove the inmunity (only for admins) delete:

PHP Code:
if(!cmd_access(idlevelcid3))
{
        return 
PLUGIN_HANDLED


And change this:

PHP Code:
public cmdSetLvL(idlevelcid


PHP Code:
public cmdSetLvL(id

Last edited by Stereo; 10-20-2011 at 15:01.
Stereo is offline
MiloSx7
Member
Join Date: Oct 2011
Location: Serbia, Nish
Old 10-20-2011 , 15:47   Re: CONCMD, Player Has Immunity...
Reply With Quote #6

Ok TnX
__________________
MiloS
MiloSx7 is offline
Send a message via MSN to MiloSx7
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-20-2011 , 21:43   Re: CONCMD, Player Has Immunity...
Reply With Quote #7

Quote:
Originally Posted by Stereo View Post
To remove the inmunity (only for admins) delete:

PHP Code:
if(!cmd_access(idlevelcid3))
{
        return 
PLUGIN_HANDLED


And change this:

PHP Code:
public cmdSetLvL(idlevelcid


PHP Code:
public cmdSetLvL(id
ABSOLUTELY WRONG!!!!! That will make the command useable by ANYBODY on ANYBODY!

The part that needs changed is cmd_target(). To remove the immunity check you need to set the third parameter to 0 (or anything that doesn't have first bit set; aka all even numbers or 0):

cmd_target(id, arg1, 0)
__________________

Last edited by fysiks; 10-20-2011 at 21:47.
fysiks 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 11:05.


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