OnPlayerWeaponShot
#7

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
Rudy_

Remember you are duplicating the object to allow it to be seen outside of the players normal VW? If your still using the method we discussed. This would mean however that you would need to detect damage to a duplicated object (normal object) on the enemies screen.
Right, But atm i haven't added the duplicate, it's visible for everyone atm (for testing), so it should have worked :/

I tried this but didn't worked

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(GetPlayerTeam(playerid) == team_hunter) // No need for a loop, as playerid is in OnPlayerWeaponShot
    {
        if(hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
        {
            foreach(new i : Player)
            {
                if(hitid == Prop[i]) // Are you sure Prop[MAX_PLAYERS] (Prop[i]) is assigned to an object?
                {
                    for(new i2=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i2++)
                    {
                        DestroyObject(Prop[i2]);
                        SetPlayerHealth(i, 0);
                        SendClientMessage(i, -1, "Test");
                        break;
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerWeaponShot - by Rudy_ - 04.10.2014, 17:57
Re: OnPlayerWeaponShot - by Stinged - 04.10.2014, 18:11
Re: OnPlayerWeaponShot - by ranme15 - 04.10.2014, 18:17
Re: OnPlayerWeaponShot - by Rudy_ - 04.10.2014, 18:19
Re: OnPlayerWeaponShot - by Eth - 04.10.2014, 18:23
Re: OnPlayerWeaponShot - by IceCube! - 04.10.2014, 18:28
Re: OnPlayerWeaponShot - by Rudy_ - 04.10.2014, 18:34
Re: OnPlayerWeaponShot - by IceCube! - 04.10.2014, 18:59
Re: OnPlayerWeaponShot - by Eth - 04.10.2014, 19:04
Re: OnPlayerWeaponShot - by Rudy_ - 05.10.2014, 09:48

Forum Jump:


Users browsing this thread: 1 Guest(s)