[FilterScript] Real Weapon Damage 1.1
#10

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
The first problem I saw is this:

pawn Код:
if(GetPlayerWeapon(shooter) == 29 || 31 || 30)
You cannot compare it that way, pawn will read it like this:
pawn Код:
if(GetPlayerWeapon(shooter) == 29)
OR
if(31)
OR
if(30)
As 31/30 are not 0, pawn reads them as true, so this line will always be true.
You will have to do it this, change all matching ifs:

pawn Код:
if(GetPlayerWeapon(shooter) == 29 || GetPlayerWeapon(shooter) == 31 || GetPlayerWeapon(shooter) == 30)
Dont know if there are other mistakes, but this is the most fatal one, as the used weapon is not detected correctly.

But however, nice work. Tons of "pro scripters" dont manage it to create something like this, and whine in the request thread, but you as a beginner just made it on your own. Keep it up!
[/quote]The first problem I saw is this:

pawn Cуdigo:

if(GetPlayerWeapon(shooter) == 29 || 31 || 30)


You cannot compare it that way, pawn will read it like this:
pawn Cуdigo:

if(GetPlayerWeapon(shooter) == 29)
OR
if(31)
OR
if(30)[/quote]

that is C# code, || => that is the "or" operator, i think thats fine...
Reply


Messages In This Thread
Real Weapon Damage - by .LaaRs. - 18.01.2011, 14:08
Re: Real Weapon Damage 1.1 - by Meinstad - 18.01.2011, 14:22
AW: Real Weapon Damage 1.1 - by .LaaRs. - 18.01.2011, 14:38
Re: Real Weapon Damage 1.1 - by SkizzoTrick - 18.01.2011, 14:41
Re: Real Weapon Damage 1.1 - by Mauzen - 18.01.2011, 14:47
AW: Real Weapon Damage 1.1 - by .LaaRs. - 18.01.2011, 14:50
Re: Real Weapon Damage 1.1 - by Matz - 02.08.2011, 08:28
Re: Real Weapon Damage 1.1 - by andrew4699 - 02.08.2011, 16:10
Re: Real Weapon Damage 1.1 - by Julio Turios - 02.08.2011, 16:22
Respuesta: Re: Real Weapon Damage 1.1 - by matimutter - 30.08.2011, 07:08

Forum Jump:


Users browsing this thread: 1 Guest(s)