OnPlayerGiveDamage fail?:( -
Saize - 03.08.2013
yo, this is my problem
Quote:
PG.pwn(911) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
|
PHP код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
return 1;
}
Line 911:
PHP код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
Re: OnPlayerGiveDamage fail?:( -
cosbraa - 03.08.2013
Above the line with public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
Put
forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);
Re: OnPlayerGiveDamage fail?:( -
JusstinRoller - 03.08.2013
PHP код:
forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);
AW: OnPlayerGiveDamage fail?:( -
Saize - 03.08.2013
It dotn works:
C:\Spiele\Server\gamemodes\PG.pwn(912) : error 055: start of function body without function header
C:\Spiele\Server\gamemodes\PG.pwn(914) : error 010: invalid function or declaration
C:\Spiele\Server\gamemodes\PG.pwn(916) : error 054: unmatched closing brace ("}")
Re: OnPlayerGiveDamage fail?:( -
Pottus - 03.08.2013
Old SAMP version ?
Re: OnPlayerGiveDamage fail?:( -
Ayumi - 03.08.2013
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); // Ding Sound
return true;
}
Replace what you have now with that.
See if it compiles?
Re: OnPlayerGiveDamage fail?:( -
Edix - 03.08.2013
I suggest you to use OnPlayerTakeDamage as GiveDamage doesnt work quite well because of the lag.
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Re: OnPlayerGiveDamage fail?:( -
Ayumi - 03.08.2013
Quote:
Originally Posted by Edix
|
The aim here is to play a "ding" sound when a player hits another player client-side. It's a little feature some servers have for a little bit of humor now and again.
Re: OnPlayerGiveDamage fail?:( -
Konstantinos - 03.08.2013
Quote:
Originally Posted by Edix
|
True. However, OnPlayerGiveDamage is not forwarded to his mode so OnPlayerTakeDamage will not be either.
Quote:
This callback was added in SA-MP 0.3d and will not work in earlier versions!
|
Don't tell me you're using a_samp.inc from 0.3c?
AW: Re: OnPlayerGiveDamage fail?:( -
Saize - 04.08.2013
Quote:
Originally Posted by Konstantinos
True. However, OnPlayerGiveDamage is not forwarded to his mode so OnPlayerTakeDamage will not be either.
Don't tell me you're using a_samp.inc from 0.3c?
|
No I dont use it lmao.
I use OnPlayerTakeDamage now with issuerid and it still dosnґt work