bank

Started by Cool, May 06, 2016, 03:18 PM

Previous topic - Next topic

Cool

how to block wepons in bank i trying this but not working
player.IsWeaponSyncBlocked = true;

KAKAN

player.CanAttack = false;
or
player.CanShoot = false;

any 1 of 'em will work.
oh no

MaTaDeToR

Quote from: Hercules on May 06, 2016, 03:18 PMhow to block wepons in bank i trying this but not working
player.IsWeaponSyncBlocked = true;
player.CanAttack = toggle;i.e :
if ( YOUR_AREA_FUNCTION =="NAME" ) player.CanAttack = true; if ( YOUR_AREA_FUNCTION !="NAME" ) player.CanAttack = false;

Cool

not working this player can still kill another take a look
function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
{
     if (Area( player, "bank" ))
  {
        Announce( "~y~ \x10 \x10 \x10 \x10 \x10 weapons disabled", player, 5 );
player.CanAttack = false;
      }
  player.CanAttack = true;
}
function Area( player, AreaName )
{
  local checkpoly;
  if ( AreaName == "bank" )
  {
   checkpoly = InPoly( player.Pos.x, player.Pos.y, -898.2357,-326.6091,-898.2196,-355.5072,-936.2309,-355.5205,-939.2854,-352.5587,-952.3001,-342.9138,-957.1079,-341.7898,-966.5380,-337.4671,-966.5401,-328.1766 );
   if ( checkpoly ) return false;
   else return true;
   }
}

KAKAN

lol, you return false instead of true and vice versa XDD
here's the fixed function:
function Area( player, AreaName )
{
  local checkpoly;
  if ( AreaName == "bank" )
  {
   checkpoly = InPoly( player.Pos.x, player.Pos.y, -898.2357,-326.6091,-898.2196,-355.5072,-936.2309,-355.5205,-939.2854,-352.5587,-952.3001,-342.9138,-957.1079,-341.7898,-966.5380,-337.4671,-966.5401,-328.1766 );
   if ( checkpoly ) return true; //Return true if the player is in the bank
   else return false;
   }
oh no

Cool

player cant shoot outside the bank why??

Coolkid

Quote from: Hercules on May 07, 2016, 02:16 PMplayer cant shoot outside the bank why??
Use your brain when player enters the bank player can attack is done False by poly so you need to do take poly of outside ban entrance and do same player can attack true by that way player can attack when he comes out of bank

dEaN

#7
try this

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )

{
     if ( IsPlayerInArea( player, "bank" ) )
{
 player.IsWeaponSyncBlocked = false;
Announce( "weapons disabled", player, 5 );
}
else
 player.IsWeaponSyncBlocked = ture;
}
update :D
I think first impressions are important when i pick up a Main.nut script and I'm sticking to the script, I'm putting that organic feeling back in the game.
-Since 2012-

Coolkid

Quote from: dEaN on May 07, 2016, 02:30 PMtry this

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )

{
     if ( IsPlayerInArea( player, "bank" ) )
{
 player.IsWeaponSyncBlocked = false;
Announce( "weapons disabled", player, 5 );
}
else
 player.IsWeaponSyncBlocked = ture;
}
update :D

I think he can take poly outside the bank and use that instead of this else because that will be easy

dEaN

I think first impressions are important when i pick up a Main.nut script and I'm sticking to the script, I'm putting that organic feeling back in the game.
-Since 2012-

Thijn

Quote from: dEaN on May 07, 2016, 02:38 PMhmmm
hmmm what? If you're just going to make a post stating your brain exploded you might as well don't post at all.

dEaN

Quote from: Thijn on May 07, 2016, 02:42 PM
Quote from: dEaN on May 07, 2016, 02:38 PMhmmm
hmmm what? If you're just going to make a post stating your brain exploded you might as well don't post at all.
what you mean?
I think first impressions are important when i pick up a Main.nut script and I'm sticking to the script, I'm putting that organic feeling back in the game.
-Since 2012-

Coolkid

Quote from: dEaN on May 07, 2016, 02:47 PM
Quote from: Thijn on May 07, 2016, 02:42 PM
Quote from: dEaN on May 07, 2016, 02:38 PMhmmm
hmmm what? If you're just going to make a post stating your brain exploded you might as well don't post at all.
what you mean?
He mean don't fucking spam here if you like a post like the post instead of saying hmm

Cool

Quote from: Coolkid on May 07, 2016, 02:34 PM
Quote from: dEaN on May 07, 2016, 02:30 PMtry this

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )

{
     if ( IsPlayerInArea( player, "bank" ) )
{
 player.IsWeaponSyncBlocked = false;
Announce( "weapons disabled", player, 5 );
}
else
 player.IsWeaponSyncBlocked = ture;
}
update :D

I think he can take poly outside the bank and use that instead of this else because that will be easy
i think coolkid you need rest in every topic you doing nosense talks shutup

Mötley

[[Rantish and lazy, yet a better way]
Does virtual world exist in VC;MP if so this is how i would do the banks?