AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   very simple question (https://forums.alliedmods.net/showthread.php?t=17266)

Obbin 08-28-2005 12:50

very simple question
 
How do i make an function like:
amx_tell <name or steamid> (onley admins could use amx_tell)

amx_tell functon should:
Code:
print_chat(0,"%s used blahablaha at %s", adminnick, victimnick)


I have looked att other plugins but i couldn'n understand![/small]

Hawk552 08-28-2005 12:55

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("INTERNET","lol","Hawk552")     register_concmd("amx_tell","tell",ADMIN_BAN," <name> - user is told") } public tell(id,level,cid) {     if(!cmd_access(id,level,cid,2))         {         return PLUGIN_HANDLED     }             new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,1)         if(!player)         {         return PLUGIN_HANDLED     }         new name[32]     new name2[32]     get_user_name(player,name,31)     get_user_name(id,name2,31)     client_print(0,print_chat,"[AMXX] %s told %s",name2,name)         return PLUGIN_HANDLED }

Obbin 08-28-2005 13:20

thx hawk :D


All times are GMT -4. The time now is 14:34.

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