Recoded weapon restrictions, and made new way of storing data. (Arrays)
* Removed ZMarket as an external plugin (to be integrated next commit) * Updated weapon configs, removed weapongroups.txt and moved weapons.txt to root zr config folder. * Moved offset finding to respective module, made new forward *OnOffsetsFound. * Updated weapons&hitgroups config file format to match playerclass.txt * Updated translations. * Recoded weapon restrict menu, commented out all zadmin options that don't quite work. * Added weaponammo module (not finished but existent) * Started zmarket module.
This commit is contained in:
@ -390,7 +390,7 @@ public Action:InfectMotherZombie(Handle:timer)
|
||||
new client;
|
||||
|
||||
// Prune list of immune clients.
|
||||
// x = array index.
|
||||
// x = Array index.
|
||||
// client = client index.
|
||||
for (new x = 0; x < eligibleclients; x++)
|
||||
{
|
||||
@ -522,7 +522,7 @@ InfectClient(client, attacker = -1, bool:motherinfect = false)
|
||||
bZombie[client] = true;
|
||||
|
||||
// Get a list of all client's weapon indexes.
|
||||
new weapons[WeaponsType];
|
||||
new weapons[WeaponsSlot];
|
||||
WeaponsGetClientWeapons(client, weapons);
|
||||
|
||||
// Check if weapons drop is enabled.
|
||||
@ -541,7 +541,7 @@ InfectClient(client, attacker = -1, bool:motherinfect = false)
|
||||
if (weaponsdrop)
|
||||
{
|
||||
// If this is the knife slot, then stop.
|
||||
if (WeaponsType:x == Type_Melee)
|
||||
if (WeaponsSlot:x == Slot_Melee)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -557,7 +557,7 @@ InfectClient(client, attacker = -1, bool:motherinfect = false)
|
||||
}
|
||||
|
||||
// If client has no knife, give them one.
|
||||
if (GetPlayerWeaponSlot(client, _:Type_Melee) == -1)
|
||||
if (GetPlayerWeaponSlot(client, _:Slot_Melee) == -1)
|
||||
{
|
||||
GivePlayerItem(client, "weapon_knife");
|
||||
}
|
||||
|
Reference in New Issue
Block a user