Sign in to follow this  
xPr3d4t0Rs

Invisible mode on usebuttonpress

Recommended Posts

You would need to create a case that makes a player invisible hmmm let me try :P

init( modVersion )

{

thread invisible();

}

onPlayerConnected() {

for(;;)

{

level waittill("connected",player);

player thread invisible();

}

}

invisible()

{

self endon( "disconnect" );

self endon( "death" );

for(;;)

{

while( isAlive(self) )

{

if( self ButtonPressed( "BUTTON_F" ) )

{

setDvar( "sv_cheats", "1" );

self hide();

setDvar( "sv_cheats", "0" );

}

else

if( !self ButtonPressed( "BUTTON_F" ) )

{

setDvar( "sv_cheats", "1" );

self show();

setDvar( "sv_cheats", "0" );

}

}

}

}

Should work if you make it like a plugin. NOT SURE :c

EDIT6 .-.: Forgot to add the nubby alive .-. GL with the script

Share this post


Link to post
Share on other sites
You would need to create a case that makes a player invisible hmmm let me try :P

init( modVersion )

{

thread invisible();

}

onPlayerConnected() {

for(;;)

{

level waittill("connected",player);

player thread invisible();

}

}

invisible()

{

self endon( "disconnect" );

self endon( "death" );

for(;;)

{

while( isAlive(self) )

{

if( self ButtonPressed( "BUTTON_F" ) )

{

setDvar( "sv_cheats", "1" );

self hide();

setDvar( "sv_cheats", "0" );

}

else

if( !self ButtonPressed( "BUTTON_F" ) )

{

setDvar( "sv_cheats", "1" );

self show();

setDvar( "sv_cheats", "0" );

}

}

}

}

Should work if you make it like a plugin. NOT SURE :c

EDIT6 .-.: Forgot to add the nubby alive .-. GL with the script

Potential infinite loop detected: Killing thread

That will show up I'm sure.

Share this post


Link to post
Share on other sites
You would need to create a case that makes a player invisible hmmm let me try :P

init( modVersion )

{

thread invisible();

}

onPlayerConnected() {

for(;;)

{

level waittill("connected",player);

player thread invisible();

}

}

invisible()

{

self endon( "disconnect" );

self endon( "death" );

for(;;)

{

while( isAlive(self) )

{

if( self ButtonPressed( "BUTTON_F" ) )

{

setDvar( "sv_cheats", "1" );

self hide();

setDvar( "sv_cheats", "0" );

}

else

if( !self ButtonPressed( "BUTTON_F" ) )

{

setDvar( "sv_cheats", "1" );

self show();

setDvar( "sv_cheats", "0" );

}

}

}

}

Should work if you make it like a plugin. NOT SURE :c

EDIT6 .-.: Forgot to add the nubby alive .-. GL with the script

Potential infinite loop detected: Killing thread

That will show up I'm sure.

I don't think so

pretty sure buttonpressed is not a cod4 function either and why are you enabling cheats on a client? security flaw there. Also why is there a "mod version" arguement?

Why not? Just use it as a plugin

I tried ButtonPressed("BUTTON_F") but it didn't work.

Not many people change their binds as I do, you could try changing that with "if ( self UseButtonPressed() )" and "if ( !self UseButtonPressed() )"

Share this post


Link to post
Share on other sites

pretty sure buttonpressed is not a cod4 function either and why are you enabling cheats on a client? security flaw there. Also why is there a "mod version" arguement?

Why not? Just use it as a plugin

because deathrun is the only mod that handles plugins that way?

Share this post


Link to post
Share on other sites
How can I use it as a plugin? I am new to scripting, can you show me?

One minute, are you trying to put it on deathrun mod or its your own mod?

pretty sure buttonpressed is not a cod4 function either and why are you enabling cheats on a client? security flaw there. Also why is there a "mod version" arguement?

Why not? Just use it as a plugin

because deathrun is the only mod that handles plugins that way?

Then, what's the problem...?

Share this post


Link to post
Share on other sites

I call it Michael Myers mod. There is one player in one team and the rest of the players in the opposite team. The aim of the one player (he is called "Michael Myers") is to kill the rest of the players and he can use only knife. The aim of the rest of the players (they are called "victims") try to survive until time runs out. If "Michael Myers" kills them all before time ran out then he wins else "victims" win. "Michael Myers" has also invisible mode and can activate it for a specific time (and also has a cooldown). I finished it yesterday and I think its quite ok but sometimes it throws me the error "AimTarget_GetTagPos: Cannot find tag [j_helmet] on entity" because of the invisible mode (I detachall the models and then i attach body and head of the player and I think the problem is I don't link them. If you have any suggestion let me know).

Share this post


Link to post
Share on other sites
I call it Michael Myers mod. There is one player in one team and the rest of the players in the opposite team. The aim of the one player (he is called "Michael Myers") is to kill the rest of the players and he can use only knife. The aim of the rest of the players (they are called "victims") try to survive until time runs out. If "Michael Myers" kills them all before time ran out then he wins else "victims" win. "Michael Myers" has also invisible mode and can activate it for a specific time (and also has a cooldown). I finished it yesterday and I think its quite ok but sometimes it throws me the error "AimTarget_GetTagPos: Cannot find tag [j_helmet] on entity" because of the invisible mode (I detachall the models and then i attach body and head of the player and I think the problem is I don't link them. If you have any suggestion let me know).

WOAH! Let me know when you finish it, I want to try it :D

Make sure you add "wait" commands inside your scripts, if not, you will have a high risk of bugs :P

And that thingy on the tag... try to change the model of the character to a custom or a default one and see if you still have the error, in my case it was because I've deleted the default characters on Deathrun mod and then I had the character set when someone dies so it was really glitchy and the mod was stopping to work on the nextround because of that.

If you want, you can contact me on Skype: thefuckingninja

I remember the way I used to play it was, when there was one person left on the other team, he could knife mike back :P

That's a nice idea, Michael won't always have the opportunnity to win but to fight ^^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this