02-27-2013, 23:25
For @tubwux
To add more weapons, OLD CODE:
Make it this :
Don't forget on the OnWeaponChange event
OLD:
Will be
And,,, go search around for basic C# tuts.
Just some basic things me and @Gam3rr0rZ made a notice of (usefull for using the mw3 server addon, and some basic C# stuff) (the // is comment, I have this in the files of my plugin):
To add more weapons, OLD CODE:
Code:
if (c.Other.isAlive)
{
if (Client.Other.CurrentWeapon == GetWeapon("iw5_ak47_mp"))
{
Client.Other.PrimaryWeaponAkimbo = true;
Client.Other.SecondaryWeaponAkimbo = true;
}
else
{
Client.Other.PrimaryWeaponAkimbo = false;
Client.Other.SecondaryWeaponAkimbo = false;
}
}
Make it this :
Code:
if (c.Other.isAlive)
{
if (Client.Other.CurrentWeapon == GetWeapon("iw5_ak47_mp") ||Client.Other.CurrentWeapon == GetWeapon("secondweapon") )
{
Client.Other.PrimaryWeaponAkimbo = true;
Client.Other.SecondaryWeaponAkimbo = true;
}
else
{
Client.Other.PrimaryWeaponAkimbo = false;
Client.Other.SecondaryWeaponAkimbo = false;
}
}
Don't forget on the OnWeaponChange event
OLD:
Code:
if (Client.Other.CurrentWeapon != GetWeapon("iw5_ak47_mp"))
{
Code:
if (Client.Other.CurrentWeapon != GetWeapon("iw5_ak47_mp") || Client.Other.CurrentWeapon != GetWeapon("secondweapon"))
{
And,,, go search around for basic C# tuts.
Just some basic things me and @Gam3rr0rZ made a notice of (usefull for using the mw3 server addon, and some basic C# stuff) (the // is comment, I have this in the files of my plugin):
Spoiler (Click to View)
Code:
// Operators:
// ': line comment
// =: is equal to
// <>: not equal to
// <: less than
// <=: less than or equal to
// >: greater than
// >=: greater than or equal to
/*
block
comment
*/
/*
//: line comment
==: is equal to
!=: not equal to
<: less than
<=: less than or equal to
>: greater than
>=: greater than or equal to
||: logical or
&&: logical and
^: logical xor
%: mod
*/
// Color table:
// 0: Black
// 1: Red
// 2: Green
// 3: Yellow
// 4: Blue
// 5: Royal Blue
// 6: Magenta
// 7: White
// 8: Brown
// 9: Gray
// Teams:
// Allies: Survivors (human)
// Axis: Infected (zombie)
// FFA: Free-For-All (!)
// Spectator: Spectator (!)
// (!) - Team do not exist in infected game type
// ServerClient:
// null: Everybody on server
// Client: Player only