player key down

Started by umar4911, Dec 26, 2017, 05:32 PM

Previous topic - Next topic

umar4911

I made 3 keys
  space <- BindKey(true, 0x20, 0, 0);
  right <- BindKey(true, 0x27, 0, 0);
  left <- BindKey(true, 0x25, 0, 0);
as name shows space, left arrow and right arrow

now key down
function onKeyDown( player, key )
{
        switch(key)
        {
case space:
if(status[player.ID].minigame && !status[player.ID].minisp)
{
_cat.teamspawn(player);
status[player.ID].minisp = true;
}
break;


case right:
if(status[player.ID].minigame && !status[player.ID].minisp)
{
player.Skin = 100;
player.Color = RGB(255,0,0);
player.Pos = Vector(-825.04, 411.876, 11.1156);
player.Angle = 1.64654;
player.IsFrozen = true;
player.Immunity = 0;
player.SetAlpha(255, 1);
}
case left:
if(status[player.ID].minigame && !status[player.ID].minisp)
{
player.Pos = Vector(-825.04, 411.876, 11.1156);
player.Angle = 1.64654;
player.IsFrozen = true;
player.Skin = 2;
player.Color = RGB(0,0,255);
player.Immunity = 0;
player.SetAlpha(255, 1);
}


                default: break;
        }
}
any of the following keys is not working
I am gamer, programmer and hacker. Try to find me!
xD

=RK=MarineForce

Look Nice

But Bro help

i am buycar

Not Cost my money help plz :'(

Try to UnderStand ME!

Xenon

Quote from: =RK=MarineForce on Dec 26, 2017, 08:34 PMBut Bro help

i am buycar

Not Cost my money help plz :'(


Are you idiot? If you need help with script then create an new topic in right board -> HERE. (click)

OnTopic: Looks ok. Any errors on the console?

!

function onKeyDown( player, key )
{
  switch(key)
  {
    case space:
      if(status[player.ID].minigame && !status[player.ID].minisp)
      {
        _cat.teamspawn(player);
        status[player.ID].minisp = true;
      }
    break;
    case right:
      if(status[player.ID].minigame && !status[player.ID].minisp)
      {
        player.Skin = 100;
        player.Color = RGB(255,0,0);
        player.Pos = Vector(-825.04, 411.876, 11.1156);
        player.Angle = 1.64654;
        player.IsFrozen = true;
        player.Immunity = 0;
        player.SetAlpha(255, 1);
      }
    break;
    case left:
      if(status[player.ID].minigame && !status[player.ID].minisp)
      {
        player.Pos = Vector(-825.04, 411.876, 11.1156);
        player.Angle = 1.64654;
        player.IsFrozen = true;
        player.Skin = 2;
        player.Color = RGB(0,0,255);
        player.Immunity = 0;
        player.SetAlpha(255, 1);
      }
    break;
    default: break;
  }
}

Discord: zeus#5155

umar4911

I am gamer, programmer and hacker. Try to find me!
xD