[Help] Aim
#1

How can i do that if some player aim on some specific intrior he will get killed?.
example: for not killing in the bank ..

Reply
#2

no one knows?..
sorry for double post it was on 2nd page.
Reply
#3

AllowInteriorWeapons(false);
Reply
#4

and it gives me what?...
it does that the weapons will not appear in the interiors,
but i want that they will appear, but you will can't aim.
Reply
#5

Then just set player's health to 0 if he press his Aim key while in an interior.
Reply
#6

and this is my question, how can i do it?..
Reply
#7

What have you tried? That's as easy as this, basically:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (newkeys & <aim key here>)
  {
    if (GetPlayerInterior(playerid)) //any interiors but outside.
    {
      if (GetPlayerWeapon(playerid)) //any weapons but fists.
      {
        SetPlayerHealth(playerid, 0.0); //kill
        return true;
      }
    }
  }
  return false;
}
Reply
#8

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (newkeys & /*don't kno what that the tightmousebuttonkey is key is*/)
  {
    if (GetPlayerInterior(playerid) > 0) //any interiors but outside.
    {
      if (GetPlayerWeapon(playerid) > 0) //any weapons but fists.
      {
        SetPlayerHealth(playerid, 0.0); //kill
        return true;
      }
    }
  }
  return false;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)