Raised This Month: $ Target: $400
 0% 

server_cmd()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-05-2009 , 06:18   server_cmd()
Reply With Quote #1

PHP Code:
#include <amxmodx>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Alucard"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /kickme""HookKickMe")
}

public 
HookKickMe(id)
{
    new 
Name[32]
    
get_user_name(idName31)
    
    
server_cmd("amx_kick %s"Name)
    
server_exec()

Is only an example... the problem is that i can use the command ONLY if i am ADMIN... but i want that all players can use this command...

Yeh, i know that the correct method to do this is:

PHP Code:
server_cmd("kick #%d"get_user_userid(id)) 
But like i said... is only an example.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 15:09.


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