06.03.2014, 20:56
Can someone tell me What is the Problem with this ?
++ REP
Код:
Z:\Shock Roleplay 0.3z\gamemodes\SRP.pwn(14875) : error 025: function heading differs from prototype Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) << Error Line
{
if(issuerid != INVALID_PLAYER_ID)
{
ShotPlayer[issuerid][playerid] = gettime();
LastShot[playerid] = gettime();
}
if(PlayerInfo[playerid][pJustLogged] == 0)
{
new Float:HP;
new Float:Armor;
GetPlayerHealth(playerid, HP);
GetPlayerArmour(playerid, Armor);
if(bodypart == 9)
{
SetPlayerHealth(playerid, 0);
SendClientMessageEx(playerid, COLOR_WHITE, "You Were Shot in the head and you died");
}
if(Armor < 1)
{
if(weaponid == 31 || weaponid == 30)
{
SetPlayerHealth(playerid, HP-(amount*3));
}
else if(weaponid == 22)
{
SetPlayerHealth(playerid, HP-20);
}
else if(weaponid == 34)
{
SetPlayerHealth(playerid, HP-100);
}
else if(weaponid == 8)
{
SetPlayerHealth(playerid, HP-30);
}
else if(weaponid == 5)
{
SetPlayerHealth(playerid, HP-20);
new hitrand = random(10);
if(hitrand <= 5)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You have been knocked to the floor by a baseball bat.");
ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,0,0);
}
}
else if(weaponid == 3)
{
SetPlayerHealth(playerid, HP-20);
new hitrand = random(10);
if(hitrand <= 5)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You have been knocked to the floor by an ASP Baton.");
ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,0,0);
}
}
else if(weaponid == 15 || weaponid == 4 || weaponid == 2 || weaponid == 6 || weaponid == 7)
{
SetPlayerHealth(playerid, HP-20);
}
else
{
if(weaponid != 26)
{
SetPlayerHealth(playerid, HP-(amount*1.5));
}
}
}
if(Armor >= 1)
{
if(weaponid == 34)
{
SetPlayerArmour(playerid, Armor-100);
}
if(Armor >= 30)
{
if(weaponid == 8)
{
SetPlayerArmour(playerid, Armor-30);
}
}
if(Armor >= 20)
{
if(weaponid == 5 || weaponid == 15 || weaponid == 3 || weaponid == 4 || weaponid == 2 || weaponid == 6 || weaponid == 7)
{
SetPlayerArmour(playerid, Armor-20);
}
}
}
}
return 1;
}