Increasing weapon damage problem. -
Darnell - 09.08.2011
I've increased weapon damge...sort of.
and got :
Quote:
D:\SAMP Server\gamemodes\script.pwn(440) : error 017: undefined symbol "shooter"
D:\SAMP Server\gamemodes\script.pwn(443) : error 017: undefined symbol "target"
D:\SAMP Server\gamemodes\script.pwn(444) : error 017: undefined symbol "target"
D:\SAMP Server\gamemodes\script.pwn(445) : error 017: undefined symbol "phealth"
D:\SAMP Server\gamemodes\script.pwn(445) : error 017: undefined symbol "target"
D:\SAMP Server\gamemodes\script.pwn(445) : error 029: invalid expression, assumed zero
|
Lines:
Line 440 :
pawn Код:
if(GetPlayerWeapon(shooter)== 22)
Line 443 :
pawn Код:
GetPlayerHealth(target,health);
Line 444:
pawn Код:
SetPlayerHealth(target,health-20);
Line 445:
pawn Код:
phealth[target]=floatround(health+armour-20);
Re: Increasing weapon damage problem. -
Captain Price - 09.08.2011
n00b Scripter....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
you need to define your Errors With "new" you know...?
Re: Increasing weapon damage problem. -
Darnell - 09.08.2011
I'm new, chill, and mind telling what to add after the ' new '.
I just started today, anyone mind helping me ?
Re: Increasing weapon damage problem. -
Jay. - 09.08.2011
Leave the guy alone , he IS learning and your not helping.
You need to define your variables like this.
pawn Код:
new shooter;
new target;
new Float:pHealth;
Get it ?
Put them under your command or
whatever callback.
Re: Increasing weapon damage problem. -
Darnell - 09.08.2011
Thanks, what command ?
Re: Increasing weapon damage problem. -
Jay. - 09.08.2011
Quote:
Originally Posted by Darnell
Thanks, what command ?
|
Above where you have all your
OnPlayerShootPlayer and whatever..
Re: Increasing weapon damage problem. -
Captain Price - 09.08.2011
pawn Код:
new Float:health,Float:armour;
for the "Target" and the "Shooter" i need your script.
if(GetPlayerWeapon(shooter)== 22
GetPlayerHealth(target,health);
SetPlayerHealth(target,health-20);
pawn Код:
new phealth[target]=floatround(health+armour-20);
Re: Increasing weapon damage problem. -
Captain Price - 09.08.2011
Quote:
Originally Posted by Darnell
Thanks, what command ?
|
Oh, God....
Re: Increasing weapon damage problem. -
Darnell - 09.08.2011
Quote:
D:\SAMP Server\gamemodes\script.pwn(446) : error 017: undefined symbol "phealth"
D:\SAMP Server\gamemodes\script.pwn(446) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\script.pwn(446) : error 001: expected token: ";", but found "]"
D:\SAMP Server\gamemodes\script.pwn(446) : error 029: invalid expression, assumed zero
|
:\...
Line 446:
pawn Код:
phealth[target]=floatround(health+armour-20);
Re: Increasing weapon damage problem. -
Captain Price - 09.08.2011
:\...
Line 446:
pawn Код:
/* >>>*/ new /* <<<*/phealth[target]=floatround(health+armour-20);
Re: Increasing weapon damage problem. -
Darnell - 09.08.2011
Quote:
:\SAMP Server\gamemodes\script.pwn(446) : error 017: undefined symbol "phealth"
D:\SAMP Server\gamemodes\script.pwn(446) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\script.pwn(446) : error 001: expected token: ";", but found "]"
D:\SAMP Server\gamemodes\script.pwn(446) : error 029: invalid expression, assumed zero
|
Same line, did what you told me.
Re: Increasing weapon damage problem. -
Captain Price - 09.08.2011
You know.. You DON'T need to do:
pawn Код:
/* >>>*/ new /* <<<*/phealth[target]=floatround(health+armour-20);
You need to do
pawn Код:
new phealth[MAX_PLAYERS] = floatround(health+armour-20);
Re: Increasing weapon damage problem. -
Darnell - 09.08.2011
Anyone can give me a new code that makes that deagle will deal 55 health points ?
And a code that tells you how much health you lost upon being hit / shot.