mirror of
https://github.com/FAUSheppy/skillbird-sourcemod
synced 2025-12-06 07:01:38 +01:00
convert all tabs to spaces
This commit is contained in:
@@ -20,10 +20,10 @@ public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadca
|
|||||||
|
|
||||||
public Action:Event_PlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast){
|
public Action:Event_PlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast){
|
||||||
SubmittEventActiveClients();
|
SubmittEventActiveClients();
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action:Event_PlayerChangedTeam(Handle:event, const String:name[], bool:dontBroadcast){
|
public Action:Event_PlayerChangedTeam(Handle:event, const String:name[], bool:dontBroadcast){
|
||||||
SubmittEventActiveClients();
|
SubmittEventActiveClients();
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,16 @@
|
|||||||
|
|
||||||
public void PrintHttpResponse(bool success, const char[] error, System2HTTPRequest request, System2HTTPResponse response, HTTPRequestMethod method) {
|
public void PrintHttpResponse(bool success, const char[] error, System2HTTPRequest request, System2HTTPResponse response, HTTPRequestMethod method) {
|
||||||
if (success) {
|
if (success) {
|
||||||
if(response.StatusCode == 204 || response.StatusCode == 200){
|
if(response.StatusCode == 204 || response.StatusCode == 200){
|
||||||
char[] content = new char[response.ContentLength + 1];
|
char[] content = new char[response.ContentLength + 1];
|
||||||
response.GetContent(content, response.ContentLength + 1);
|
response.GetContent(content, response.ContentLength + 1);
|
||||||
PrintToChatAll("%s", content);
|
PrintToChatAll("%s", content);
|
||||||
}else if(response.StatusCode == 404){
|
}else if(response.StatusCode == 404){
|
||||||
PrintToChatAll("skillbird:error:player_not_in_db");
|
PrintToChatAll("skillbird:error:player_not_in_db");
|
||||||
}else{
|
}else{
|
||||||
PrintToChatAll("skillbird:error:scheduled_downtime:database_backup");
|
PrintToChatAll("skillbird:error:scheduled_downtime:database_backup");
|
||||||
}
|
}
|
||||||
} else {
|
}else{
|
||||||
PrintToChatAll("skillbird:error: backend unavailiable");
|
PrintToChatAll("skillbird:error: backend unavailiable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,28 +13,28 @@
|
|||||||
|
|
||||||
/* ---------------------- Plugin ---------------------- */
|
/* ---------------------- Plugin ---------------------- */
|
||||||
public Plugin:myinfo = {
|
public Plugin:myinfo = {
|
||||||
name = "Skillbird",
|
name = "Skillbird",
|
||||||
author = "FAUSheppy",
|
author = "FAUSheppy",
|
||||||
description = "Module to interact with the skillbird framework",
|
description = "Module to interact with the skillbird framework",
|
||||||
version = "3.0",
|
version = "3.0",
|
||||||
url = "https://github.com/FAUSheppy/skillbird-sourcemod"
|
url = "https://github.com/FAUSheppy/skillbird-sourcemod"
|
||||||
};
|
};
|
||||||
|
|
||||||
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max){
|
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max){
|
||||||
return APLRes_Success;
|
return APLRes_Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OnPluginStart(){
|
public OnPluginStart(){
|
||||||
|
|
||||||
/* Hook Events */
|
/* Hook Events */
|
||||||
HookEvent("round_end", Event_RoundEnd);
|
HookEvent("round_end", Event_RoundEnd);
|
||||||
HookEvent("player_team", Event_PlayerChangedTeam);
|
HookEvent("player_team", Event_PlayerChangedTeam);
|
||||||
HookEvent("player_disconnect", Event_PlayerDisconnect);
|
HookEvent("player_disconnect", Event_PlayerDisconnect);
|
||||||
|
|
||||||
CreateConVar(VAR_SESSION_ID, "0", "Session in for this round");
|
CreateConVar(VAR_SESSION_ID, "0", "Session in for this round");
|
||||||
CreateConVar(VAR_TARGET_PORT, "6200", "Skillbird backend target port", FCVAR_PROTECTED);
|
CreateConVar(VAR_TARGET_PORT, "6200", "Skillbird backend target port", FCVAR_PROTECTED);
|
||||||
|
|
||||||
RegConsoleCmd("rating", CommandRating);
|
RegConsoleCmd("rating", CommandRating);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OnClientAuthorized(client, const String:auth[]){
|
public OnClientAuthorized(client, const String:auth[]){
|
||||||
|
|||||||
Reference in New Issue
Block a user