#include <core> #include <string> #include <admin> #include <adminlib> #define ACCESS_FRAG 0 #define ACCESS_FRAGUS 0 new AM_VERSION_STRING[] = "2.50.05"; /* admin_fragsay */ public admin_fragsay(HLCommand,HLData,HLUserName,UserIndex) { new Command[MAX_DATA_LENGTH]; new Data[MAX_DATA_LENGTH]; new User[MAX_DATA_LENGTH]; new Text[MAX_TEXT_LENGTH]; new frags; convert_string(HLCommand,Command,MAX_DATA_LENGTH); convert_string(HLData,Data,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_DATA_LENGTH); get_userFrags(User, frags); snprintf(Text, MAX_TEXT_LENGTH, "%s frags: %d", User, frags); say(Text); return PLUGIN_HANDLED; } public admin_fragus(HLCommand,HLData,HLUserName,UserIndex){ new frags; new Text[MAX_TEXT_LENGTH]; new Data[MAX_DATA_LENGTH]; convert_string(HLData,Data,MAX_DATA_LENGTH); get_userFrags(Data, frags); snprintf(Text, MAX_TEXT_LENGTH, "%s frags: %d", Data, frags); say(Text); return PLUGIN_HANDLED; } public plugin_init() { plugin_registerinfo("Admin Frag Count Plugin","Commands for retrieving frags.",AM_VERSION_STRING); plugin_registercmd("admin_fragsay","admin_fragsay",ACCESS_FRAG,"admin_fragsay: Displays current users Frags"); plugin_registercmd("admin_fragus","admin_fragus",ACCESS_FRAGUS,"admin_fragus <Target>: Displays <Target's> Frags"); return PLUGIN_CONTINUE; }