Error 021: symbol already defined: "OnPlayerTakeDamage"
#6

Good. Now it has more error.
PHP код:
public OnPlayerTakeDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
// error 021
    
if(bodypart == 3PlayerInfo[playerid][pBodyStatus][0] -= frandom(1.0);
    if(
bodypart == 4PlayerInfo[playerid][pBodyStatus][1] -= frandom(1.0);
    if(
bodypart == 5PlayerInfo[playerid][pBodyStatus][3] -= frandom(1.0);
    if(
bodypart == 6PlayerInfo[playerid][pBodyStatus][2] -= frandom(1.0);
    if(
bodypart == 7PlayerInfo[playerid][pBodyStatus][5] -= frandom(1.0);
    if(
bodypart == 8PlayerInfo[playerid][pBodyStatus][4] -= frandom(1.0);
    
ShowBloodScreen(playeridamount);
    new 
status[64], Float:healthFloat:armorstring[128];
    
GetPlayerHealth(playeridhealth);
    
GetPlayerArmour(playeridarmor);
    
format(statussizeof(status), "Stranger_%d\n{ff0000}H: %.1f\n{ffffff}A: %.1f"RandMask[playerid], healtharmor);
    
UpdateDynamic3DTextLabelText(MaskText[playerid], 0xFFFFFFFFstatus);
    if(
issuerid != INVALID_PLAYER_ID && weaponid == 31 && bodypart == 9//error 017
    
{
        if(!
PlayerInfo[playerid][pHS])
        {
            
PlayerInfo[playerid][pHS] = 1;
            
ProxDetector(30.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
ApplyAnimation(playerid,"CRACK""crckdeth2"4.11001600);
        }
    }
    if(
issuerid != INVALID_PLAYER_ID && bodypart == 8)
    {
        if(!
PlayerInfo[playerid][pRLS])
        {
            
PlayerInfo[playerid][pRLS] = 1;
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
ApplyAnimation(playerid,"CRACK""crckdeth2"4.11001600);
        }
    }
    if(
issuerid != INVALID_PLAYER_ID && bodypart == 5)
    {
        if(!
PlayerInfo[playerid][pLAS])
        {
            
PlayerInfo[playerid][pLAS] = 1;
            
ProxDetector(30.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_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.0playeridstringCOLOR_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"
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)