Raised This Month: $51 Target: $400
 12% 

[REQ] ~ [Teach me]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
frOOgy
Senior Member
Join Date: Jul 2014
Old 01-16-2015 , 14:20   [REQ] ~ [Teach me]
Reply With Quote #1

hello all,

Can anyone teach how how to make admin cmd plugin. ex: I want to make new slay cmd but for admin with flag: $. I want to make new flags for cmds. THX
__________________
Help me in other requests

Change Map System [PLUGIN]

GaG System [PLUGIN] [PLUGIN]
frOOgy is offline
Send a message via Skype™ to frOOgy
frOOgy
Senior Member
Join Date: Jul 2014
Old 01-16-2015 , 14:39   Re: [REQ] ~ [Teach me]
Reply With Quote #2

I tryed to make my slay cmd with flag "$" but Have one error

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "AMXX SLAY"
#define VERSION "v1"
#define AUTHOR "frOOgy"

#define AMXX_SLAY     "$"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_slay""cmd_slay"AMXX_SLAY"<name or #userid>")
}

public 
cmd_slay(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
arg[32]
    
    
read_argv(1arg31)
    
    new 
player cmd_target(idargCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF CMDTARGET_ONLY_ALIVE)
    
    if (!
player)
    {
        return 
PLUGIN_HANDLED
    
}
    
    
user_kill(player)
    
    new 
authid[32], name2[32], authid2[32], name[32]
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)
    
    
console_print(id"[AMXX] %s [CLIENT SLAYED]"name2)
    
    
ColorChat(0GREEN"^4[AMXX]^1 ADMIN ^3%s ^1slayed ^3%s"namename2)
    
    return 
PLUGIN_HANDLED

error:

Code:
AMXX_SLAY.sma(17) : error 035: argument type mismatch (argument 3)
__________________
Help me in other requests

Change Map System [PLUGIN]

GaG System [PLUGIN] [PLUGIN]
frOOgy is offline
Send a message via Skype™ to frOOgy
Obada
Senior Member
Join Date: Dec 2014
Location: Abu Dhabi
Old 01-16-2015 , 22:28   Re: [REQ] ~ [Teach me]
Reply With Quote #3

there is no such flag "$"
Obada is offline
popeye10
Senior Member
Join Date: May 2014
Location: Navi Mumbai (India)
Old 01-17-2015 , 00:17   Re: [REQ] ~ [Teach me]
Reply With Quote #4

Access Flag Purpose
a immunity (can't be kicked/baned/slayed/slaped and affected by other commmands)
b reservation (can join on reserved slots)
c amx_kick command
d amx_ban and amx_unban commands
e amx_slay and amx_slap commands
f amx_map command
g amx_cvar command (not all cvars will be available)
h amx_cfg command
i amx_chat and other chat commands
j amx_vote and other vote commands
k access to sv_password cvar (by amx_cvar command)
l access to amx_rcon command and rcon_password cvar (by amx_cvar command)
m custom level A (for additional plugins)
n custom level B
o custom level C
p custom level D
q custom level E
r custom level F
s custom level G
t custom level H
u menu access
z user (no admin)

__________________

Last edited by popeye10; 01-17-2015 at 00:17.
popeye10 is offline
frOOgy
Senior Member
Join Date: Jul 2014
Old 01-17-2015 , 04:40   Re: [REQ] ~ [Teach me]
Reply With Quote #5

1. I was try with flag "a" too and does not work.
2. How Hattrick make new flags:

;m Admin Model
;i Immunity
;r Rezervation
;p Plague
;s Swarm
;v Survivor
;x Sniper
;@ Gag
;$ Slap
;4 Destroy
;7 Map
;c Kick
;d Ban
;5 Add Ban
;e Slay
;n Nemesis
;b Assassin
;j Armageddon
;2 Nightmare
;9 Assassins vs Snipers
;o Multiple Infection
;z Zombie
;h Human
;6 Respawn
;g Votemap
;k Spectator
;1 Freeze
;f Chat
;y Say
;3 Last
;a 2 Ammo Packs
;l 4 Ammo Packs
;q 6 Ammo Packs
;t 8 Ammo Packs
;u 10 Ammo Packs
;w 12 Ammo Packs
;8 14 Ammo Packs
frOOgy is offline
Send a message via Skype™ to frOOgy
Old 01-17-2015, 07:29
Eagle07
This message has been deleted by Eagle07. Reason: nvm
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 01-19-2015 , 01:45   Re: [REQ] ~ [Teach me]
Reply With Quote #6

Quote:
Originally Posted by frOOgy View Post
1. I was try with flag "a" too and does not work.
PHP Code:
 register_concmd("amx_slay""cmd_slay"AMXX_SLAY"<name or #userid>"
to

PHP Code:
 register_concmd("amx_slay""cmd_slay"ADMIN_IMMUNITY"<name or #userid>"
here it is A flag = ADMIN_IMMUNITY
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
bat
Veteran Member
Join Date: Jul 2012
Old 01-19-2015 , 03:34   Re: [REQ] ~ [Teach me]
Reply With Quote #7

Quote:
Originally Posted by indraraj striker View Post
PHP Code:
 register_concmd("amx_slay""cmd_slay"AMXX_SLAY"<name or #userid>"
to

PHP Code:
 register_concmd("amx_slay""cmd_slay"ADMIN_IMMUNITY"<name or #userid>"
here it is A flag = ADMIN_IMMUNITY
He asked a help with coustum flags create by Hattrick.

Now frOOgy you can't add coustum flags because you use flags from amxmodx. Maybe you have some information about coustum flags?
__________________
bat is offline
Send a message via Skype™ to bat
frOOgy
Senior Member
Join Date: Jul 2014
Old 01-19-2015 , 05:59   Re: [REQ] ~ [Teach me]
Reply With Quote #8

No bro, I don't have any informations. I have Zombie Outstanding addons and I see diferent admin flags and I want to know how to make commands with diferent admin flags.
frOOgy is offline
Send a message via Skype™ to frOOgy
bat
Veteran Member
Join Date: Jul 2012
Old 01-19-2015 , 06:25   Re: [REQ] ~ [Teach me]
Reply With Quote #9

Try...
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "AMXX SLAY"
#define VERSION "v1"
#define AUTHOR "frOOgy"

#define AMXX_SLAY     "$"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)

    new 
acces read_flags(AMXX_SLAY)
    
    
register_concmd("amx_slay""cmd_slay"acces"<name or #userid>")
}

public 
cmd_slay(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
arg[32]
    
    
read_argv(1arg31)
    
    new 
player cmd_target(idargCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF CMDTARGET_ONLY_ALIVE)
    
    if (!
player)
    {
        return 
PLUGIN_HANDLED
    
}
    
    
user_kill(player)
    
    new 
authid[32], name2[32], authid2[32], name[32]
    
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)
    
    
console_print(id"[AMXX] %s [CLIENT SLAYED]"name2)
    
    
ColorChat(0GREEN"^4[AMXX]^1 ADMIN ^3%s ^1slayed ^3%s"namename2)
    
    return 
PLUGIN_HANDLED

__________________
bat is offline
Send a message via Skype™ to bat
frOOgy
Senior Member
Join Date: Jul 2014
Old 01-19-2015 , 08:01   Re: [REQ] ~ [Teach me]
Reply With Quote #10

thx bro, I will test it after...
frOOgy is offline
Send a message via Skype™ to frOOgy
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 16:43.


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