Quote:
Originally Posted by cbk1994
Set a variable like "this.gunOut" on the first press. If it's false, show the gun. If it's true, shoot. If the weapon changes or the player puts the gun away, set it to false.
|
Believe I tried that in multiple ways. still it shoots on the second equip, Here's what I have so far:
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code, key)
switch(key)
case "d":
this.equip = !this.equip;
if(!this.equip || this.equip == false)
freezeplayer(0.1);
setani(this.gani.idle, null);
replaceani("walk", this.gani.walk);
replaceani("idle", this.gani.idle);
if(this.equip || this.equip == true)
onFire();
break;
Missing braces intentional on here. Other then that, something i missed?
Edit: Feel free to state anything you see wrong, but i believe i found my own mistake.
Quote:
Originally Posted by papajchris
No he means like how on Era when you press D to equpt a gun, it ONLY equipts it. It doesnt shoot. Not until you press D again. (Or i tihnk thats whats he meant
|
Yes it is what I meant.