From fb5b552f865320c6f1b9226720146a99c047ab56 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 9 Nov 2014 16:35:45 -0800 Subject: [PATCH] Port basecommands.sp. --- plugins/basecommands.sp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/plugins/basecommands.sp b/plugins/basecommands.sp index 0a4f9986..5bc80f6d 100644 --- a/plugins/basecommands.sp +++ b/plugins/basecommands.sp @@ -85,7 +85,7 @@ public OnPluginStart() SetMenuTitle(g_MapList, "%T", "Please select a map", LANG_SERVER); SetMenuExitBackButton(g_MapList, true); - decl String:mapListPath[PLATFORM_MAX_PATH]; + char mapListPath[PLATFORM_MAX_PATH]; BuildPath(Path_SM, mapListPath, sizeof(mapListPath), "configs/adminmenu_maplist.ini"); SetMapListCompatBind("sm_map menu", mapListPath); @@ -118,7 +118,7 @@ bool:IsVarProtected(const String:cvar[]) bool:IsClientAllowedToChangeCvar(client, const String:cvarname[]) { - new Handle:hndl = FindConVar(cvarname); + ConVar hndl = FindConVar(cvarname); new bool:allowed = false; new client_flags = client == 0 ? ADMFLAG_ROOT : GetUserFlagBits(client); @@ -129,7 +129,7 @@ bool:IsClientAllowedToChangeCvar(client, const String:cvarname[]) } else { - if (GetConVarFlags(hndl) & FCVAR_PROTECTED) + if (hndl.Flags & FCVAR_PROTECTED) { allowed = ((client_flags & ADMFLAG_PASSWORD) == ADMFLAG_PASSWORD); } @@ -212,7 +212,7 @@ new String:g_FlagNames[FLAG_STRINGS][20] = CustomFlagsToString(String:buffer[], maxlength, flags) { - decl String:joins[6][6]; + char joins[6][6]; new total; for (new i=_:Admin_Custom1; i<=_:Admin_Custom6; i++) @@ -230,7 +230,7 @@ CustomFlagsToString(String:buffer[], maxlength, flags) FlagsToString(String:buffer[], maxlength, flags) { - decl String:joins[FLAG_STRINGS+1][32]; + char joins[FLAG_STRINGS+1][32]; new total; for (new i=0; i