01.02.2018, 06:29
Good. Now it has more error.
PHP код:
public OnPlayerTakeDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{ // error 021
if(bodypart == 3) PlayerInfo[playerid][pBodyStatus][0] -= frandom(1.0);
if(bodypart == 4) PlayerInfo[playerid][pBodyStatus][1] -= frandom(1.0);
if(bodypart == 5) PlayerInfo[playerid][pBodyStatus][3] -= frandom(1.0);
if(bodypart == 6) PlayerInfo[playerid][pBodyStatus][2] -= frandom(1.0);
if(bodypart == 7) PlayerInfo[playerid][pBodyStatus][5] -= frandom(1.0);
if(bodypart == 8) PlayerInfo[playerid][pBodyStatus][4] -= frandom(1.0);
ShowBloodScreen(playerid, amount);
new status[64], Float:health, Float:armor, string[128];
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armor);
format(status, sizeof(status), "Stranger_%d\n{ff0000}H: %.1f\n{ffffff}A: %.1f", RandMask[playerid], health, armor);
UpdateDynamic3DTextLabelText(MaskText[playerid], 0xFFFFFFFF, status);
if(issuerid != INVALID_PLAYER_ID && weaponid == 31 && bodypart == 9) //error 017
{
if(!PlayerInfo[playerid][pHS])
{
PlayerInfo[playerid][pHS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",2000,0,"i",playerid);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) //error 017
{
if(!PlayerInfo[playerid][pHS])
{
PlayerInfo[playerid][pHS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",2000,0,"i",playerid);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 9) //error 017
{
if(!PlayerInfo[playerid][pHS])
{
PlayerInfo[playerid][pHS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",2000,0,"i",playerid);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 30 && bodypart == 9) //error 017
{
if(!PlayerInfo[playerid][pHS])
{
PlayerInfo[playerid][pHS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",2000,0,"i",playerid);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 25 && bodypart == 9) //error 017
{
if(!PlayerInfo[playerid][pHS])
{
PlayerInfo[playerid][pHS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",2000,0,"i",playerid);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 27 && bodypart == 9) //error 017
{
if(!PlayerInfo[playerid][pHS])
{
PlayerInfo[playerid][pHS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",2000,0,"i",playerid);
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 7)
{
if(!PlayerInfo[playerid][pLLS])
{
PlayerInfo[playerid][pLLS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid,"CRACK", "crckdeth2", 4.1, 1, 0, 0, 1, 600);
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 8)
{
if(!PlayerInfo[playerid][pRLS])
{
PlayerInfo[playerid][pRLS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid,"CRACK", "crckdeth2", 4.1, 1, 0, 0, 1, 600);
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 5)
{
if(!PlayerInfo[playerid][pLAS])
{
PlayerInfo[playerid][pLAS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 6)
{
if(!PlayerInfo[playerid][pRAS])
{
PlayerInfo[playerid][pRAS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 4)
{
if(!PlayerInfo[playerid][pCS])
{
if(health < 15)
{
PlayerInfo[playerid][pCS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",3000,0,"i",playerid);
}
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 3)
{
if(!PlayerInfo[playerid][pTS])
{
if(health < 15)
{
PlayerInfo[playerid][pTS] = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("KillPlayer",3000,0,"i",playerid);
}
}
}
return 1;
}
Код:
a.TMP(90306) : error 021 : symbol already defined: "OnPlayerTakeDamage" a.TMP(90321) : error 017 : undefined symbol "weaponid" a.TMP(90330) : error 017 : undefined symbol "weaponid" a.TMP(90339) : error 017 : undefined symbol "weaponid" a.TMP(90348) : error 017 : undefined symbol "weaponid" a.TMP(90357) : error 017 : undefined symbol "weaponid" a.TMP(90366) : error 017 : undefined symbol "weaponid"