27.01.2012, 03:42
(
Последний раз редактировалось Mac-10; 28.01.2012 в 01:28.
)
I have tried and tried to figure this out on my own, and it just seems impossible to, but so simple at the same time. I'm having trouble adding OnPlayerTakeDamage into my Gamemode..Here is What I get after Compile...
(2601) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
(5505) : warning 213: tag mismatch
(5507) : warning 213: tag mismatch
(26636) : warning 213: tag mismatch
(42333) : warning 213: tag mismatch
(48964) : warning 213: tag mismatch
(48977) : warning 213: tag mismatch
Here is the code OnPlayerTakeDamage..Lines 2601-2624
Would be much appreciated with helpful feedback..
Thanks.
(2601) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
(5505) : warning 213: tag mismatch
(5507) : warning 213: tag mismatch
(26636) : warning 213: tag mismatch
(42333) : warning 213: tag mismatch
(48964) : warning 213: tag mismatch
(48977) : warning 213: tag mismatch
Here is the code OnPlayerTakeDamage..Lines 2601-2624
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
new Float:Health,Float:Armour;
GetPlayerHealth(playerid,Health);
GetPlayerArmour(playerid,Armour);
if(Health == 0)
{
//SendDeathMessage(issuerid,playerid,weaponid);
}
else if(Armour > 0)
{
SetPlayerArmourEx(playerid,Armour+amount);
GetPlayerArmour(playerid,Armour);
SetPlayerArmourEx(playerid,Armour-Weapons[weaponid][ArmourDamage]);
} else {
SetPlayerHealthEx(playerid,Health+amount);
GetPlayerHealth(playerid,Health);
SetPlayerHealthEx(playerid,Health-Weapons[weaponid][Damage]);
}
}
return 1;
}
pawn Код:
Line 5505 if(Weapons[i][GetPlayerWeapon(i)] == 0)
Line 5507 Weapons[i][GetPlayerWeapon(i)]=1;
Line 26636 if(Weapons[playerid][GetPlayerWeapon(playerid)] == 0)
Line 42333 if(Weapons[playerid][weaponid] == 0)
Line 48964 Weapons[playerid][weaponid] = 1;
Line 48977 Weapons[playerid][i] = 0;
Thanks.