How To Fix This
#1

I Have This Eror
pawn Код:
C:\DOCUME~1\user\Desktop\Server\PARADI~1\FILTER~1\HitSound.pwn(53) : error 017: undefined symbol "amount"
C:\DOCUME~1\user\Desktop\Server\PARADI~1\FILTER~1\HitSound.pwn(54) : error 017: undefined symbol "playerid"
C:\DOCUME~1\user\Desktop\Server\PARADI~1\FILTER~1\HitSound.pwn(55) : error 017: undefined symbol "playerid"
C:\DOCUME~1\user\Desktop\Server\PARADI~1\FILTER~1\HitSound.pwn(56) : error 017: undefined symbol "playerid"
C:\DOCUME~1\user\Desktop\Server\PARADI~1\FILTER~1\HitSound.pwn(57) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
and this is my script
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new s[20];
    format(s, 20, "+Damage %.0f", amount);
    TextDrawSetString(GiveDamage[playerid], s);
    TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
    PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
    return 1;
}
Thanks Before
Reply
#2

pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new s[20], Float:Armour;
    if(GetPlayerArmour(Target, Armour) >= 1)
    {
            format(s, 20, "+Damage %.0f", ArmourLost);
    }
    else
    {
           format(s, 20, "+Damage %.0f", HealthLost);
    }
    TextDrawSetString(GiveDamage[Target], s);
    TextDrawShowForPlayer(Target, GiveDamage[Target]);
    PlayerPlaySound(Target,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", Target);
    return 1;
}
Reply
#3

Thanks Working .
Rep++
Reply
#4

Quote:
Originally Posted by JustBored
Посмотреть сообщение
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new s[20], Float:Armour;
    if(GetPlayerArmour(Target, Armour) >= 1)
    {
            format(s, 20, "+Damage %.0f", ArmourLost);
    }
    else
    {
           format(s, 20, "+Damage %.0f", HealthLost);
    }
    TextDrawSetString(GiveDamage[Target], s);
    TextDrawShowForPlayer(Target, GiveDamage[Target]);
    PlayerPlaySound(Target,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", Target);
    return 1;
}
hey i have one problem , i change Target to Shooter and it fine , but i have one problem in textdraw , the textdraw no showing outing damage , just showing 0 damage ,like this +Damage 0 , and that textdraw always showing in Target no in shooter . how to fix it .
Reply
#5

Well, try this, never tested
Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new s[20], Float:Armour;
    if(GetPlayerArmour(Target, Armour) >= 1)
    {
            format(s, 20, "+Damage %d", ArmourLost);
    }
    else
    {
           format(s, 20, "+Damage %d", HealthLost);
    }
    TextDrawSetString(GiveDamage[Target], s);
    TextDrawShowForPlayer(Shooter, GiveDamage[Target]);
    PlayerPlaySound(Shooter,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", Shooter);
    return 1;
}
Edit: i edited the code of JustBored.
Reply
#6

pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new s[20];
    if(ArmourLost > 0)
    {
        format(s, 20, "+Damage %d", floatround(ArmourLost, floatround_round));
    }
    else if(HealthLost > 0)
    {
        format(s, 20, "+Damage %d", floatround(HealthLost, floatround_round));
    }
    TextDrawSetString(GiveDamage[Shooter], s);
    TextDrawShowForPlayer(Shooter, GiveDamage[Shooter]);
    PlayerPlaySound(Shooter,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", Shooter);
    return 1;
}
Try out with that. Eventhough if that doenst work you can go to one system that has to work but doesnt specify if the player has lost health or armour.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)