1.Da gibst so nen plugin ... plugin stop ....
der entfehrnt alle binds ..
veränder den dann einfach so, dass der nur die laufen tasten unbindet ...
__________________________________________
2.Mach doch was mit bury ... dann alle eingraden ... oder mit stack ...
GENAU stack is gut ..
hier der stop plugin :
Code:
/* Revised: 03 December 2001
** Been a while since i looked at this plugin, iv changed it since it was
** a bit buggy anyways, instead of trying to rebind a users configs, iv made
** it so it just re execs a users config.cfg file thus restoring there binds
** that should fix the problem of someone losing there binds providing they
** dont quit once they get the stop plugin executed on them.
*/
/* The other thing i have done is got it to log anyone who it stops to a file
** called "StopList.txt" which can be found in your mod directory.
*/
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_STOP 8192
#define ACCESS_STOPTEAM 8192
#define ACCESS_STARTTEAM 8192
new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.e"
new StopFile[]="StopList.txt"
public admin_stop(HLCommand,HLData,HLUserName,UserIndex) {
new Command[MAX_DATA_LENGTH];
new Data[MAX_DATA_LENGTH];
new iStatus;
new strstop[MAX_DATA_LENGTH];
new strstopper[MAX_DATA_LENGTH];
new User[MAX_DATA_LENGTH];
new TargetName[MAX_NAME_LENGTH];
new target[MAX_NAME_LENGTH];
new strStatus[MAX_DATA_LENGTH];
new Text[MAX_DATA_LENGTH];
new strMessage[MAX_DATA_LENGTH];
convert_string(HLCommand,Command,MAX_DATA_LENGTH);
convert_string(HLData,Data,MAX_DATA_LENGTH);
convert_string(HLUserName,User,MAX_DATA_LENGTH);
strbreak(Data,strstopper,strstop, MAX_DATA_LENGTH);
strbreak(Data,target,strStatus, MAX_DATA_LENGTH);
iStatus = strtonum(strStatus);
get_username(target,TargetName,MAX_NAME_LENGTH);
if (check_user(TargetName)==1) {
if(check_user(TargetName)==0) {
strcat(Text, "You Can't Stop ", MAX_TEXT_LENGTH);
strcat(Text,TargetName,MAX_DATA_LENGTH);
strcat(Text, ", he is a GoD!",MAX_DATA_LENGTH);
say(Text);
return PLUGIN_HANDLED;
} else
if( iStatus == 0 ) {
execclient(TargetName, "cl_forwardspeed 450");
execclient(TargetName, "cl_sidespeed 450");
execclient(TargetName, "cl_backspeed 450");
execclient(TargetName, "cl_upspeed 450");
execclient(TargetName, "bind mouse1 +attack");
execclient(TargetName, "bind mouse2 +attack2");
execclient(TargetName, "bind ¬ toggleconsole");
execclient(TargetName, "bind ` toggleconsole");
execclient(TargetName, "bind ~ toggleconsole");
execclient(TargetName, "say I can move again! Yippee!");
execclient(TargetName, "bind ESCAPE cancelselect");
execclient(TargetName, "exec config.cfg");
execclient(TargetName, "console 1");
execclient(TargetName, "clear");
strcat(strMessage,TargetName, MAX_DATA_LENGTH);
strcat(strMessage, " Has Been Re-Animated",MAX_DATA_LENGTH);
centersay( strMessage, 10, 255, 10, 10 );
centersay( strMessage, 10, 10, 255, 10 );
} else
if( iStatus == 1 ) {
strcat(strMessage,TargetName, MAX_DATA_LENGTH);
strcat(strMessage, " Has Been De-Animated",MAX_DATA_LENGTH);
centersay( strMessage, 10, 255, 10, 10 );
centersay( strMessage, 10, 10, 255, 10 );
execclient(TargetName, "cl_forwardspeed 0");
execclient(TargetName, "cl_sidespeed 0");
execclient(TargetName, "cl_backspeed 0");
execclient(TargetName, "cl_upspeed 0");
execclient(TargetName, "bind mouse1 +duck");
execclient(TargetName, "bind mouse2 +jump");
execclient(TargetName, "bind ¬ +left");
execclient(TargetName, "bind ` +left");
execclient(TargetName, "bind ~ +left");
execclient(TargetName, "say I cannot move! A Admin Has stopped me moving :-(");
execclient(TargetName, "bind ESCAPE +duck");
execclient(TargetName, "console 0");
execclient(TargetName, "clear");
writefile(StopFile,strMessage);
} else
selfmessage( "Please Select 1/0 to enable/disable Stop Status on Player");
} else {
selfmessage( "Unrecognized player: ");
selfmessage( TargetName );
}
return PLUGIN_HANDLED;
}
public admin_stopteam(HLCommand,HLData,HLUserName,UserIndex) {
new Command[MAX_COMMAND_LENGTH];
new Data[MAX_DATA_LENGTH];
new i;
new maxplayers = maxplayercount();
new SessionID;
new stopteam;
new TargetName[MAX_NAME_LENGTH];
new Team;
new Text[MAX_TEXT_LENGTH];
new User[MAX_NAME_LENGTH];
new WONID;
convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
convert_string(HLData,Data,MAX_DATA_LENGTH);
convert_string(HLUserName,User,MAX_NAME_LENGTH);
stopteam = strtonum(Data);
if(stopteam > 0) {
snprintf(Text, MAX_TEXT_LENGTH, "[ADMIN] Team #%i has been De-Animated by %s.", stopteam, User);
say(Text);
for(i=1; i<=maxplayers; i++) {
strinit(TargetName);
if(playerinfo(i,TargetName,MAX_NAME_LENGTH,SessionID,WONID,Team)==1) {
if(Team==stopteam && i != UserIndex) {
if(check_immunity(TargetName)==0) {
execclient(TargetName, "cl_forwardspeed 0");
execclient(TargetName, "cl_sidespeed 0");
execclient(TargetName, "cl_backspeed 0");
execclient(TargetName, "cl_upspeed 0");
execclient(TargetName, "bind mouse1 +duck");
execclient(TargetName, "bind mouse2 +jump");
execclient(TargetName, "bind ¬ +left");
execclient(TargetName, "bind ` +left");
execclient(TargetName, "bind ~ +left");
execclient(TargetName, "say I cannot move! A Admin Has stopped me moving :-(");
execclient(TargetName, "bind ESCAPE +duck");
messageex(TargetName, Text, print_chat);
messageex(TargetName, "[ADMIN] You have been De-Animated by a Admin.", print_chat);
execclient(TargetName, "console 0");
execclient(TargetName, "clear");
}
}
}
}
} else {
selfmessage("The team to Stop must be a number.");
}
return PLUGIN_HANDLED;
}
public admin_startteam(HLCommand,HLData,HLUserName,UserIndex) {
new Command[MAX_COMMAND_LENGTH];
new Data[MAX_DATA_LENGTH];
new i;
new maxplayers = maxplayercount();
new SessionID;
new startteam;
new TargetName[MAX_NAME_LENGTH];
new Team;
new Text[MAX_TEXT_LENGTH];
new User[MAX_NAME_LENGTH];
new WONID;
convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
convert_string(HLData,Data,MAX_DATA_LENGTH);
convert_string(HLUserName,User,MAX_NAME_LENGTH);
startteam = strtonum(Data);
if(startteam > 0) {
snprintf(Text, MAX_TEXT_LENGTH, "[ADMIN] Team #%i has been Re-Animated by %s.", startteam, User);
say(Text);
for(i=1; i<=maxplayers; i++) {
strinit(TargetName);
if(playerinfo(i,TargetName,MAX_NAME_LENGTH,SessionID,WONID,Team)==1) {
if(Team==startteam && i != UserIndex) {
if(check_immunity(TargetName)==0) {
execclient(TargetName, "cl_forwardspeed 450");
execclient(TargetName, "cl_sidespeed 450");
execclient(TargetName, "cl_backspeed 450");
execclient(TargetName, "cl_upspeed 450");
execclient(TargetName, "bind mouse1 +attack");
execclient(TargetName, "bind mouse2 +attack2");
execclient(TargetName, "bind ¬ toggleconsole");
execclient(TargetName, "bind ` toggleconsole");
execclient(TargetName, "bind ~ toggleconsole");
execclient(TargetName, "exec config.cfg");
messageex(TargetName, Text, print_chat);
messageex(TargetName, "[ADMIN] You Have Been Re-Animated by a Admin.", print_chat);
execclient(TargetName, "bind ESCAPE cancelselect");
execclient(TargetName, "console 1");
execclient(TargetName, "clear");
}
}
}
}
} else {
selfmessage("The team to Start must be a number.");
}
return PLUGIN_HANDLED;
}
public plugin_init() {
plugin_registerinfo("Stop Plugin","Advanced Pause, Stops players/Teams moving.",STRING_VERSION);
plugin_registercmd("admin_stop", "admin_stop", ACCESS_STOP, "admin_stop <user> <1/0> Stops a Player From Moving.");
plugin_registercmd("admin_stopteam", "admin_stopteam", ACCESS_STOPTEAM, "admin_stopteam <Team Number 1/2> Stops a Team From Moving.");
plugin_registercmd("admin_startteam", "admin_startteam", ACCESS_STARTTEAM, "admin_startteam <Team Number 1/2> Start a Team Moving Again.");
return PLUGIN_CONTINUE;
}