forked from UNLOZE/sm-plugins
SR: final polish + KR: add handle clean
This commit is contained in:
@@ -28,7 +28,7 @@ public void OnPluginStart()
|
||||
{
|
||||
RegConsoleCmd("sm_stuck", Command_StuckRequest, "Send a request to admins for being stuck");
|
||||
RegConsoleCmd("sm_zstuck", Command_StuckRequest, "Send a request to admins for being stuck");
|
||||
RegAdminCmd("sm_acc", Command_AcceptRequest, ADMFLAG_GENERIC, "Accept the current stuck-request");
|
||||
RegAdminCmd("sm_acc", Command_AcceptRequest, ADMFLAG_GENERIC, "Accepts the current stuck-request");
|
||||
RegAdminCmd("sm_deny", Command_DenyRequest, ADMFLAG_GENERIC, "Denies the current stuck-request");
|
||||
|
||||
HookEvent("player_death", OnPlayerDeath);
|
||||
@@ -85,7 +85,7 @@ public void OnClientDisconnect(int client)
|
||||
{
|
||||
if(IsAdmin(i))
|
||||
{
|
||||
CPrintToChat(i, "{lightgreen}[StuckRequest]{yellow} %N left the Server while having a Request open.", g_iStuckRequester);
|
||||
CPrintToChat(i, "{lightgreen}[StuckRequest]{yellow} %N left the Server while having a Request open. Request aborted.", g_iStuckRequester);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,9 +102,9 @@ public Action Command_StuckRequest(int client, int args)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
if(IsAdmin(client))
|
||||
if(BaseComm_IsClientGagged(client))
|
||||
{
|
||||
CReplyToCommand(client, "{lightgreen}[StuckRequest]{yellow} Don't be silly! Teleport yourself.");
|
||||
ReplyToCommand(client, "{lightgreen}[StuckRequest]{yellow} Cannot use this while being gagged.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
@@ -120,12 +120,6 @@ public Action Command_StuckRequest(int client, int args)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
if(BaseComm_IsClientGagged(client))
|
||||
{
|
||||
ReplyToCommand(client, "{lightgreen}[StuckRequest]{yellow} Cannot use while being gagged.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
if(!IsPlayerAlive(client))
|
||||
{
|
||||
CReplyToCommand(client, "{lightgreen}[StuckRequest]{yellow} Cannot use this while being dead.");
|
||||
@@ -138,6 +132,12 @@ public Action Command_StuckRequest(int client, int args)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
if(IsAdmin(client))
|
||||
{
|
||||
CReplyToCommand(client, "{lightgreen}[StuckRequest]{yellow} Don't be silly! Teleport yourself.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
CReplyToCommand(client, "{lightgreen}[StuckRequest]{yellow} Sent your Request to Admins!");
|
||||
g_iStuckRequester = client;
|
||||
SendRequestToAdmin(g_iStuckRequester);
|
||||
@@ -180,6 +180,7 @@ public Action OnStuckRequest(Handle timer)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user