imaninja1991
New member
I'm trying to make a script where if the player is pushing attack while walking he will shoot, but only if he is pushing enter. Like contra. I tried this script.
{// Revert to idle if left and right are not pressed
void self = getlocalvar("self");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void iRKey = playerkeys(iPIndex, 0, "attack");
if (iRKey){
stop();
spawn01("bullet", 0, 0, 0 );
}
}
But it keeps crashing. Also I might use shoot instead but still.
{// Revert to idle if left and right are not pressed
void self = getlocalvar("self");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void iRKey = playerkeys(iPIndex, 0, "attack");
if (iRKey){
stop();
spawn01("bullet", 0, 0, 0 );
}
}
But it keeps crashing. Also I might use shoot instead but still.