Recoded IsClientPlayer, renamed to IsClientValid, replaced

GetMaxClients() with maxclients
Ignore diff for zhp.inc and spawnprotect.inc
This commit is contained in:
Greyscale
2009-04-16 03:57:46 +02:00
parent f39570205e
commit 872e41e6d2
14 changed files with 394 additions and 385 deletions

View File

@ -48,7 +48,7 @@ Admin mode is enabled!
ClassMenuMain(client)
{
new Handle:menu = CreateMenu(ClassMenuMainHandle);
new itemdraw = (IsClientAdmin(client)) ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED;
new itemdraw = (ZRIsClientAdmin(client)) ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED;
SetGlobalTransTarget(client);
SetMenuTitle(menu, "%t\n", "!zclass title");
@ -83,7 +83,7 @@ ClassMenuMain(client)
Format(humanselect, sizeof(humanselect), "%t\n %s", "!zclass human", humanclass);
AddMenuItem(menu, "", humanselect);
if (IsClientAdmin(client))
if (ZRIsClientAdmin(client))
{
// List admin class options.
ClassGetName(ClassSelected[client][ZR_CLASS_TEAM_ADMINS], adminclass, sizeof(adminclass), ZR_CLASS_CACHE_MODIFIED);
@ -134,7 +134,7 @@ public ClassMenuMainHandle(Handle:menu, MenuAction:action, client, slot)
}
case 3:
{
ClassMenuToggleAdmin(client);
// ClassMenuToggleAdmin(client);
}
}
}
@ -273,5 +273,4 @@ public ClassMenuSelectHandle(Handle:menu, MenuAction:action, client, slot)
ClassMenuToggleAdmin(client)
{
}

View File

@ -457,7 +457,7 @@ bool:ClassReloadDataCache()
bool:ClassReloadPlayerCache(client, classindex, cachetype = ZR_CLASS_CACHE_MODIFIED)
{
// Validate indexes.
if (!ClassValidateIndex(classindex) || !IsClientPlayer(client))
if (!ClassValidateIndex(classindex) || !ZRIsValidClient(client))
{
return false;
}