C:\Users\yan\Desktop\LS DM\gamemodes\DBv1.pwn(1478) : error 021: symbol already defined: "OnPlayerTakeDamage" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#include <a_samp> #include <a_mysql> #include <geolocation> #include <zcmd> #include <sscanf2> #include <foreach> #include "../include/gl_common.inc" #include <weapon-config>
Have you tried looking at the precise line for it and still nothing? That would be weird indeed.
CTRL + H and enter 1478 and see. |
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) { new str[150],target, name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME]; GetPlayerName(playerid, name2,sizeof(name2)); GetPlayerName(target, name1,sizeof(name1)); if(issuerid != INVALID_PLAYER_ID && weapon == 34 && bodypart == 9) { format(str, sizeof(str), "{c3c33}* %s has just landed a {FFFFFF}head-shot {BCA9F5}on %s's head !", name1, name2); SendClientMessageToAll(-1,str); SendClientMessage(target, -1, "{BCA9F5}* You got +2 points for headshot"); GameTextForPlayer(target,"~y~+2", 300,4); pInfo[playerid][Points] += 2; } new Float:phealth; GetPlayerHealth(playerid); if(phealth > 100) { SetPlayerColor(playerid, COLOR_GREEN); } if(phealth > 65) { SetPlayerColor(playerid, COLOR_YELLOW); } if(phealth > 50) { SetPlayerColor(playerid, COLOR_ORANGE); } if(phealth > 40) { SetPlayerColor(playerid, COLOR_RED); } new string[50], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new Float:health; GetPlayerHealth(playerid, health); if(playerid != INVALID_PLAYER_ID && issuerid != INVALID_PLAYER_ID) { SetTimerEx("Damage", 4000, false, "i", issuerid); format(string, sizeof(string), "{7FFFD4}%.0f damage by %s\n{7FFFD4}%.0f HP left", amount, name, health); SetPlayerChatBubble(playerid, string, -1, 60.0, 3000); } return 1; }
if(phealth >= 100)
{
SetPlayerColor(playerid, COLOR_GREEN);
}
else if(phealth > 65)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
else if(phealth > 50)
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
else if(phealth > 40)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(phealth > 40)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(phealth > 50)
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
if(phealth > 65)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(phealth >= 100)
{
SetPlayerColor(playerid, COLOR_GREEN);
}