forked from UNLOZE/sm-plugins
batch remove trailing spaces and convert windows \r\n line endings to linux \n
i don't want to have to do this again, fix your shitty code editors @commiters !!!
This commit is contained in:
@@ -86,7 +86,7 @@ native bool:ZRT_IsRoundActive();
|
||||
***********************************
|
||||
-----------------------------------*/
|
||||
|
||||
public SharedPlugin:__pl_zr_tools =
|
||||
public SharedPlugin:__pl_zr_tools =
|
||||
{
|
||||
name = "zr_tools",
|
||||
file = "zr_tools.smx",
|
||||
|
||||
@@ -9,7 +9,7 @@ new Handle:kv;
|
||||
new Handle:hPlayerClasses, String:sClassPath[PLATFORM_MAX_PATH] = "configs/zr/playerclasses.txt";
|
||||
new bool:g_RoundEnd = false;
|
||||
|
||||
public Plugin:myinfo =
|
||||
public Plugin:myinfo =
|
||||
{
|
||||
name = "[ZR] Tools",
|
||||
author = "FrozDark",
|
||||
@@ -26,18 +26,18 @@ public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
|
||||
CreateNative("ZRT_GetClientAttributeValueFloat", Native_GetClientAttributeValueFloat);
|
||||
CreateNative("ZRT_PlayerHasAttribute", Native_PlayerHasAttribute);
|
||||
CreateNative("ZRT_IsRoundActive", Native_IsRoundActive);
|
||||
|
||||
|
||||
RegPluginLibrary("zr_tools");
|
||||
|
||||
|
||||
return APLRes_Success;
|
||||
}
|
||||
|
||||
public OnPluginStart()
|
||||
{
|
||||
CreateConVar("zr_tools_version", PLUGIN_VERSION, "Zombie:Reloaded tools plugin version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_CHEAT|FCVAR_DONTRECORD);
|
||||
|
||||
|
||||
RegAdminCmd("zr_tools_reload", Command_Reload, ADMFLAG_ROOT);
|
||||
|
||||
|
||||
HookEvent("round_start", Event_RoundStart);
|
||||
HookEvent("round_end", Event_RoundEnd);
|
||||
}
|
||||
@@ -69,10 +69,10 @@ public OnConfigsExecuted()
|
||||
CloseHandle(kv);
|
||||
}
|
||||
kv = CreateKeyValues("classes");
|
||||
|
||||
|
||||
decl String:buffer[PLATFORM_MAX_PATH];
|
||||
BuildPath(Path_SM, buffer, sizeof(buffer), "%s", sClassPath);
|
||||
|
||||
|
||||
if (!FileToKeyValues(kv, buffer))
|
||||
{
|
||||
SetFailState("Class data file \"%s\" not found", buffer);
|
||||
@@ -104,13 +104,13 @@ public Native_PlayerHasAttribute(Handle:plugin, numParams)
|
||||
{
|
||||
new client = GetNativeCell(1);
|
||||
ValidateClient(client);
|
||||
|
||||
|
||||
decl String:attrib[32];
|
||||
GetNativeString(2, attrib, sizeof(attrib));
|
||||
|
||||
|
||||
decl String:className[64], String:buffer[64];
|
||||
ZR_GetClassDisplayName(client, className, sizeof(className), ZR_CLASS_CACHE_PLAYER);
|
||||
|
||||
|
||||
new bool:result = false;
|
||||
if (KvGotoFirstSubKey(kv))
|
||||
{
|
||||
@@ -120,14 +120,14 @@ public Native_PlayerHasAttribute(Handle:plugin, numParams)
|
||||
if (StrEqual(buffer, className, false))
|
||||
{
|
||||
KvGetString(kv, attrib, buffer, sizeof(buffer), "0");
|
||||
|
||||
|
||||
result = bool:(StrContains("yes|1|true", buffer, false) != -1);
|
||||
break;
|
||||
}
|
||||
} while (KvGotoNextKey(kv));
|
||||
}
|
||||
KvRewind(kv);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -135,14 +135,14 @@ public Native_GetClientAttributeString(Handle:plugin, numParams)
|
||||
{
|
||||
new client = GetNativeCell(1);
|
||||
ValidateClient(client);
|
||||
|
||||
|
||||
decl String:attrib[32];
|
||||
GetNativeString(2, attrib, sizeof(attrib));
|
||||
|
||||
|
||||
decl String:className[64], String:buffer[PLATFORM_MAX_PATH];
|
||||
buffer[0] = '\0';
|
||||
ZR_GetClassDisplayName(client, className, sizeof(className), ZR_CLASS_CACHE_PLAYER);
|
||||
|
||||
|
||||
new bytes;
|
||||
if (KvGotoFirstSubKey(kv))
|
||||
{
|
||||
@@ -152,14 +152,14 @@ public Native_GetClientAttributeString(Handle:plugin, numParams)
|
||||
if (StrEqual(buffer, className, false))
|
||||
{
|
||||
KvGetString(kv, attrib, buffer, sizeof(buffer), "");
|
||||
|
||||
|
||||
SetNativeString(3, buffer, GetNativeCell(4), true, bytes);
|
||||
break;
|
||||
}
|
||||
} while (KvGotoNextKey(kv));
|
||||
}
|
||||
KvRewind(kv);
|
||||
|
||||
|
||||
if (!buffer[0])
|
||||
{
|
||||
GetNativeString(5, buffer, sizeof(buffer));
|
||||
@@ -172,15 +172,15 @@ public Native_GetClientAttributeValue(Handle:plugin, numParams)
|
||||
{
|
||||
new client = GetNativeCell(1);
|
||||
ValidateClient(client);
|
||||
|
||||
|
||||
decl String:attrib[32];
|
||||
GetNativeString(2, attrib, sizeof(attrib));
|
||||
|
||||
|
||||
decl String:className[64], String:buffer[PLATFORM_MAX_PATH];
|
||||
ZR_GetClassDisplayName(client, className, sizeof(className), ZR_CLASS_CACHE_PLAYER);
|
||||
|
||||
|
||||
new result = -1;
|
||||
|
||||
|
||||
if (KvGotoFirstSubKey(kv))
|
||||
{
|
||||
do
|
||||
@@ -194,7 +194,7 @@ public Native_GetClientAttributeValue(Handle:plugin, numParams)
|
||||
} while (KvGotoNextKey(kv));
|
||||
}
|
||||
KvRewind(kv);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -202,15 +202,15 @@ public Native_GetClientAttributeValueFloat(Handle:plugin, numParams)
|
||||
{
|
||||
new client = GetNativeCell(1);
|
||||
ValidateClient(client);
|
||||
|
||||
|
||||
decl String:attrib[32];
|
||||
GetNativeString(2, attrib, sizeof(attrib));
|
||||
|
||||
|
||||
decl String:className[64], String:buffer[PLATFORM_MAX_PATH];
|
||||
ZR_GetClassDisplayName(client, className, sizeof(className), ZR_CLASS_CACHE_PLAYER);
|
||||
|
||||
|
||||
new Float:result = -1.0;
|
||||
|
||||
|
||||
if (KvGotoFirstSubKey(kv))
|
||||
{
|
||||
do
|
||||
@@ -224,7 +224,7 @@ public Native_GetClientAttributeValueFloat(Handle:plugin, numParams)
|
||||
} while (KvGotoNextKey(kv));
|
||||
}
|
||||
KvRewind(kv);
|
||||
|
||||
|
||||
return _:result;
|
||||
}
|
||||
|
||||
@@ -232,10 +232,10 @@ public Native_GetClientClassSectionName(Handle:plugin, numParams)
|
||||
{
|
||||
new client = GetNativeCell(1);
|
||||
ValidateClient(client);
|
||||
|
||||
|
||||
decl String:className[64], String:buffer[64];
|
||||
ZR_GetClassDisplayName(client, className, sizeof(className), ZR_CLASS_CACHE_PLAYER);
|
||||
|
||||
|
||||
new bytes;
|
||||
if (KvGotoFirstSubKey(kv))
|
||||
{
|
||||
@@ -245,14 +245,14 @@ public Native_GetClientClassSectionName(Handle:plugin, numParams)
|
||||
if (StrEqual(buffer, className, false))
|
||||
{
|
||||
KvGetSectionName(kv, buffer, sizeof(buffer));
|
||||
|
||||
|
||||
SetNativeString(2, buffer, GetNativeCell(3), true, bytes);
|
||||
break;
|
||||
}
|
||||
} while (KvGotoNextKey(kv));
|
||||
}
|
||||
KvRewind(kv);
|
||||
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user