17.01.2013, 14:57
hEY, i want do when i shot player and is hit him is do that sound
Код:
PlayerPlaySound(playerid, 1142, X, Y, Z);
PlayerPlaySound(playerid, 1142, X, Y, Z);
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { PlayerPlaySound(playerid, 1142, 0.0,0.0,0.0); return 1; }
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { PlayerPlaySound(issuerid, 1142, 0.0,0.0,0.0); return 1; }
C:\Documents and Settings\CT\Desktop\HUYA TDM\pawno\new.pwn(83) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new Float: X, Float:Y, Float:z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1142, X,Y,Z);
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && issuerid != playerid) //playerid for bug fixes
{
PlayPlayerSound...
//code continues.
error
Код:
C:\Documents and Settings\CT\Desktop\HUYA TDM\pawno\new.pwn(83) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage") |
forward OnPlayerTakeDemage();
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
new Float: X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1142, X,Y,Z);
return 1;
}
You need to forward onplayertakedemage.
On top, where you have all forwards put this: pawn Код:
pawn Код:
This should work. When you get more errors then put these errors here. And the code, where is the error! |