mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 00:43:20 +00:00
Minor improvements to various plugins
This commit is contained in:
parent
51a6841e78
commit
dc4e938ae6
5 changed files with 8 additions and 8 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -63,7 +63,7 @@ public Action Command_SpawnSpecial(int client, int args) {
|
||||||
GetCmdArg(1, arg1, sizeof(arg1));
|
GetCmdArg(1, arg1, sizeof(arg1));
|
||||||
int executioner = GetAnyValidClient();
|
int executioner = GetAnyValidClient();
|
||||||
if (args < 1) {
|
if (args < 1) {
|
||||||
ReplyToCommand(client, "[SM] Usage: sm_spawnspecial <hunter|smoker|boomer|spitter|charger|jockey|mob> - Requests a special to spawn via director", arg1);
|
ReplyToCommand(client, "[SM] Usage: sm_spawnspecial <hunter|smoker|boomer|spitter|charger|jockey|mob|tank|witch> - Requests a special to spawn via director", arg1);
|
||||||
} else {
|
} else {
|
||||||
if (executioner <= 0) {
|
if (executioner <= 0) {
|
||||||
ReplyToCommand(client, "[SM] Cannot spawn a %s as there are no players online.", arg1);
|
ReplyToCommand(client, "[SM] Cannot spawn a %s as there are no players online.", arg1);
|
||||||
|
@ -94,7 +94,7 @@ public Action Command_SpawnSpecialForceLocal(int client, int args) {
|
||||||
char arg1[32];
|
char arg1[32];
|
||||||
GetCmdArg(1, arg1, sizeof(arg1));
|
GetCmdArg(1, arg1, sizeof(arg1));
|
||||||
if (args < 1) {
|
if (args < 1) {
|
||||||
ReplyToCommand(client, "[SM] Usage: sm_forcecursor <hunter|smoker|boomer|spitter|charger|jockey|mob> - Requests a special to spawn at cursor", arg1);
|
ReplyToCommand(client, "[SM] Usage: sm_forcecursor <hunter|smoker|boomer|spitter|charger|jockey|mob|tank|witch> - Requests a special to spawn at cursor", arg1);
|
||||||
} else {
|
} else {
|
||||||
if(StrEqual(arg1,"panic",false)) {
|
if(StrEqual(arg1,"panic",false)) {
|
||||||
CheatCommand(client, "director_force_panic_event", "", "");
|
CheatCommand(client, "director_force_panic_event", "", "");
|
||||||
|
@ -112,7 +112,7 @@ public Action Command_SpawnSpecialForceLocal(int client, int args) {
|
||||||
AnnounceSpawn(arg1);
|
AnnounceSpawn(arg1);
|
||||||
LogAction(client, -1, "\"%L\" spawned a \"%s\"", client, arg1);
|
LogAction(client, -1, "\"%L\" spawned a \"%s\"", client, arg1);
|
||||||
}
|
}
|
||||||
return Plugin_Handled;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action Command_SpawnSpecialForce(int client, int args) {
|
public Action Command_SpawnSpecialForce(int client, int args) {
|
||||||
|
@ -120,7 +120,7 @@ public Action Command_SpawnSpecialForce(int client, int args) {
|
||||||
GetCmdArg(1, arg1, sizeof(arg1));
|
GetCmdArg(1, arg1, sizeof(arg1));
|
||||||
int executioner = GetAnyValidClient();
|
int executioner = GetAnyValidClient();
|
||||||
if (args < 1) {
|
if (args < 1) {
|
||||||
ReplyToCommand(client, "[SM] Usage: sm_forcespecial <hunter|smoker|boomer|spitter|charger|jockey|mob> - Requests a special to spawn via director", arg1);
|
ReplyToCommand(client, "[SM] Usage: sm_forcespecial <hunter|smoker|boomer|spitter|charger|jockey|mob|tank|witch> - Requests a special to spawn via director", arg1);
|
||||||
} else {
|
} else {
|
||||||
if (executioner <= 0) {
|
if (executioner <= 0) {
|
||||||
ReplyToCommand(client, "[SM] Cannot spawn a %s as there are no players online.", arg1);
|
ReplyToCommand(client, "[SM] Cannot spawn a %s as there are no players online.", arg1);
|
||||||
|
@ -243,7 +243,7 @@ stock int GetAnyValidClient()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
stock void CheatCommand(int client, char[] command, char[] argument1, char[] argument2)
|
stock void CheatCommand(int client, const char[] command, const char[] argument1, const char[] argument2)
|
||||||
{
|
{
|
||||||
int userFlags = GetUserFlagBits(client);
|
int userFlags = GetUserFlagBits(client);
|
||||||
SetUserFlagBits(client, ADMFLAG_ROOT);
|
SetUserFlagBits(client, ADMFLAG_ROOT);
|
||||||
|
@ -254,7 +254,7 @@ stock void CheatCommand(int client, char[] command, char[] argument1, char[] arg
|
||||||
SetUserFlagBits(client, userFlags);
|
SetUserFlagBits(client, userFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnnounceSpawn(char[] type) {
|
void AnnounceSpawn(const char[] type) {
|
||||||
switch(g_cMdAnnounceLevel.IntValue) {
|
switch(g_cMdAnnounceLevel.IntValue) {
|
||||||
case 1:
|
case 1:
|
||||||
if(StrEqual(type,"tank") || StrEqual(type,"witch")) {
|
if(StrEqual(type,"tank") || StrEqual(type,"witch")) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ public Action CheckTimer(Handle timer) {
|
||||||
static int timer_update_pos;
|
static int timer_update_pos;
|
||||||
if(GetClientCount(true) == 0) return Plugin_Continue;
|
if(GetClientCount(true) == 0) return Plugin_Continue;
|
||||||
for(int i = 1; i < MaxClients; i++) {
|
for(int i = 1; i < MaxClients; i++) {
|
||||||
if(IsClientConnected(i) && !IsFakeClient(i) && bIsSurvivorClient[i]) {
|
if(IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i) && bIsSurvivorClient[i]) {
|
||||||
bool usingMinigun = GetEntProp(i, Prop_Send, "m_usingMountedGun", 1) == 1;
|
bool usingMinigun = GetEntProp(i, Prop_Send, "m_usingMountedGun", 1) == 1;
|
||||||
bool usingMountedWeapon = GetEntProp(i, Prop_Send, "m_usingMountedWeapon", 1) == 1;
|
bool usingMountedWeapon = GetEntProp(i, Prop_Send, "m_usingMountedWeapon", 1) == 1;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public Action CheckTimer(Handle timer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int bot = 1; bot < MaxClients; bot++) {
|
for(int bot = 1; bot < MaxClients; bot++) {
|
||||||
if(IsClientConnected(bot) && IsFakeClient(bot) && bIsSurvivorClient[bot]) {
|
if(IsClientConnected(bot) && IsClientInGame(i) && IsFakeClient(bot) && bIsSurvivorClient[bot]) {
|
||||||
float botPos[3];
|
float botPos[3];
|
||||||
GetClientAbsOrigin(bot, botPos);
|
GetClientAbsOrigin(bot, botPos);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue