Raised This Month: $ Target: $400
 0% 

get user flags


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-19-2014 , 12:35   get user flags
Reply With Quote #1

Hello , i have a hns plugin that slays player if he is using developer.
I want it didn't slay only admin with acces RCON. I can't . I got many errors after compiling .
There is the original plugin:
Quote:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define DEVELOPER_OFFSET 768
#define MAXWARNS 3
#define is_user_valid(%1) (1 <= %1 <= 32)
new cvar_MaxFps;
new iFrames[33]
new iWarnings[33]
new alive[33]
public plugin_init()
{
register_plugin("Anti-developer", "1.0", "NeuTroN aka Menethil")
register_forward(FM_PlayerPreThink, "Fwd_PlayerPreThink")
cvar_MaxFps = register_cvar("amx_maxfps", "130")
register_event( "DeathMsg", "eventDeath", "a" )
RegisterHam(Ham_Spawn,"player","playerSpawn")
}

public Fwd_PlayerPreThink(id)
{
if(!alive[id])
return FMRES_IGNORED
iFrames[id]++
return FMRES_IGNORED
}


public client_putinserver(id)
{
iFrames[id] = 0
set_task(1.0, "ShowFps",id+DEVELOPER_OFFSET, _, _, "b");
}

public ShowFps(id)
{
id-=DEVELOPER_OFFSET
if(is_user_alive(id) && iFrames[id] >= get_pcvar_num(cvar_MaxFps))
{
iWarnings[id]++
if(iWarnings[id] >= MAXWARNS)
{
new name[32]
get_user_name(id,name,31)

user_kill(id)
client_print(0, print_chat, " %s slayed for using developer",name)
}
}
iFrames[id] = 0
}

public client_disconnect(id)
{
if(task_exists(id+DEVELOPER_OFFSET))
{
remove_task(id+DEVELOPER_OFFSET)
}
}

public playerSpawn(id)
{
alive[id] = 1
return PLUGIN_CONTINUE
}

public eventDeath()
{
new victim = read_data(2)
if(is_user_valid(victim))
{
alive[victim] = 0
}
}
Pls Help. I want something :
if (get_user_flags(players[i]) & ADMIN_RCON
{
dont do anything..
}else{

user_kill (id)
siriusmd99 is offline
 



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 10:08.


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