Hello can to help mee? [+REP]
#1

Hello can to help mee with a little scriptxD :P

I want to create if player is cordinate's x y z and will shot by gteam human setplayerhealth killerid 0.
But not killerid i want when take damage.
Reply
#2

Uh..
This?

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(gTeam[issuerid] == TEAM_HUMAN)
        {
            if(IsPlayerInRangeOfPoint(issuerid, 5, /*Positions Here*/))
            {
                SetPlayerHealth(issuerid, 0);
                new Float:hp;
                GetPlayerHealth(playerid, hp);
                SetPlayerHealth(playerid, hp+amount);
            }
        }
    }
    return 1;
}
Reply
#3

Love you Bro Thank you so mutch Best Player REPPED xD Thank You xD
Reply
#4

Bro and something work but have a bug.
I want to make if team zombie is in range point when player take damage kill dhat the take damage.
and and team human is in/out range point and shot zombie when zombie is in range point kill human.

PLEASE BRO HELP MEE I WILL REP YOU.
Reply
#5

what do u mean first eplain first part but i think u need to use isplayerinrangeof and an loop for team
Reply
#6

Hmm Look Bro.
If player is team zombie and is in rangepoint x y z. and take damage by team human set health of the human 0.
And Something.
This must work and if player in range point or out range point.
Reply
#7

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    PlayerShotPlayer[issuerid][playerid] = 1;

    if(team[issuerid] == TEAM_HUMAN)
    {
        if(IsPlayerInRangeOfPoint(playerid, 7.0, Coordinates))
        {
            if(team[playerid] == TEAM_ZOMBIE)
            {
                SetPlayerHealth(playerid, 0);
        }
    }
}
Reply
#8

hmm u need to check that he is hitting zombie or not
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(gTeam[playerid] == TEAM_HUMAN && gTeam[issuerid] == TEAM_ZOMBIE)
        {
            if(IsPlayerInRangeOfPoint(issuerid, 5, /*Positions Here*/))
            {
                SetPlayerHealth(playerid, 0);
                new Float:hp;
                GetPlayerHealth(issuerid, hp);
                SetPlayerHealth(issuerid, hp+amount);
            }
        }
    }
    return 1;
}
clad i think he wants that if human attacks in the range of that zombie the human gets killed
Reply
#9

Quote:
Originally Posted by Kyance
Посмотреть сообщение
Uh..
This?

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(gTeam[issuerid] == TEAM_HUMAN)
        {
            if(IsPlayerInRangeOfPoint(issuerid, 5, /*Positions Here*/))
            {
                SetPlayerHealth(issuerid, 0);
                new Float:hp;
                GetPlayerHealth(playerid, hp);
                SetPlayerHealth(playerid, hp+amount);
            }
        }
    }
    return 1;
}
Its somethinglike this but this is if team human and is in range point and shot team zombie kill him.
i want it to
If player zombie and is in range point && get damage by team human set health of the human 0.
Understand ?
Reply
#10

Quote:
Originally Posted by Clad
Посмотреть сообщение
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    PlayerShotPlayer[issuerid][playerid] = 1;

    if(team[issuerid] == TEAM_HUMAN)
    {
        if(IsPlayerInRangeOfPoint(playerid, 7.0, Coordinates))
        {
            if(team[playerid] == TEAM_ZOMBIE)
            {
                SetPlayerHealth(playerid, 0);
        }
    }
}
This should work Alindi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)