Added ragdoll module that removes ragdolls normally or with effects.
*Added log entries, fixed typo. *Fixed some errors caused by disabling the weapons module. *Replaced strcmp with StrEqual
This commit is contained in:
@ -34,8 +34,15 @@ new g_iWeaponsCurType[MAXPLAYERS + 1];
|
||||
* Sends main weapon menu to client.
|
||||
* @param client The client index.
|
||||
*/
|
||||
WeaponsMenuMain(client)
|
||||
bool:WeaponsMenuMain(client)
|
||||
{
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create menu handle.
|
||||
new Handle:menu_weapons_main = CreateMenu(WeaponsMenuMainHandle);
|
||||
|
||||
@ -58,6 +65,8 @@ WeaponsMenuMain(client)
|
||||
|
||||
// Send menu.
|
||||
DisplayMenu(menu_weapons_main, client, MENU_TIME_FOREVER);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -530,6 +530,20 @@ public ZRTools_Action:RestrictCanUse(client, weapon)
|
||||
return ZRTools_Continue;
|
||||
}
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
{
|
||||
return ZRTools_Continue;
|
||||
}
|
||||
|
||||
// If restrict module is disabled, then stop.
|
||||
new bool:restrict = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_RESTRICT]);
|
||||
if (!restrict)
|
||||
{
|
||||
return ZRTools_Continue;
|
||||
}
|
||||
|
||||
// If the weapon is restricted, then prevent pickup.
|
||||
new index = WeaponsNameToIndex(weaponname);
|
||||
|
||||
@ -572,13 +586,6 @@ public ZRTools_Action:RestrictCanUse(client, weapon)
|
||||
*/
|
||||
public Action:RestrictCommand(client, argc)
|
||||
{
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command restrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
@ -597,6 +604,13 @@ public Action:RestrictCommand(client, argc)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command restrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
decl String:target[WEAPONS_MAX_LENGTH];
|
||||
|
||||
new args = GetCmdArgs();
|
||||
@ -626,13 +640,6 @@ public Action:RestrictCommand(client, argc)
|
||||
*/
|
||||
public Action:UnrestrictCommand(client, argc)
|
||||
{
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command unrestrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
@ -651,6 +658,13 @@ public Action:UnrestrictCommand(client, argc)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command unrestrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// arg1 = weapon being restricted
|
||||
decl String:target[WEAPONS_MAX_LENGTH];
|
||||
|
||||
|
@ -190,6 +190,16 @@ ZMarketGetPurchaseCount(client, const String:weapon[])
|
||||
*/
|
||||
bool:ZMarketMenuTypes(client)
|
||||
{
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
{
|
||||
// Telle client feature is disabled.
|
||||
TranslationPrintToChat(client, "Feature is disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
// If ZMarket module is disabled, then stop.
|
||||
new bool:zmarket = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET]);
|
||||
if (!zmarket)
|
||||
{
|
||||
|
Reference in New Issue
Block a user