Quantcast

Jump to content

» «
Photo

Robbery Mod V2

25 replies to this topic
Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#1

Posted 08 June 2014 - 10:13 AM

Hi all,i just started working on the robbery mod again, but i have one question.

 

I have a variable named Apple that is an intenger (just as example) and when u press right mouse button i want to increase Apple by one like this:

Apple++

 

I have no idea how to do this, because if i do:

if (Game.isGameKeyPressed(GameKey.Aim))
            {
                Apple++;
            }

It does not working :/


LetsPlayOrDy
  • LetsPlayOrDy

    I'm just different...

  • Members
  • Joined: 24 Aug 2013
  • None

#2

Posted 08 June 2014 - 12:59 PM

Where did you put that code? You should put that into a timer.


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#3

Posted 08 June 2014 - 03:25 PM Edited by stef538, 08 June 2014 - 03:31 PM.

Okay so you have an integer, called apple.

private int apple
apple = 0;

if (Game.isGameKeyPressed(GameKey.Aim))
{
   Apple++;
}

so if you press the aim key, it should go up right ? and I don´t know if putting it in a timer would work, since it is suppose to raise on a button press.

 

so it probably works, but to check if it works you can do this :

private int apple
apple = 0;

if (Game.isGameKeyPressed(GameKey.Aim))
{
   Apple++;
   Game.DisplayText(Apple, 2000);
}

So everytime you press aim, you see a white text in the left corner of your screen, with the value of Apple.

 

then if you want it to change something when Apple is a certain number you can do this :

If (Apple == 1)
{
 //DoStuff
}

LetsPlayOrDy
  • LetsPlayOrDy

    I'm just different...

  • Members
  • Joined: 24 Aug 2013
  • None

#4

Posted 08 June 2014 - 05:50 PM

Do you want it for button pressed or button down? If you want it for button down, use a timer and that code. If you want button down, use this:

BindKey(Keys.RButton, () => //Put this where your code initial runs (example in: public ScriptName() { /* code here */ } )
            {
               Apple++;
            }

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#5

Posted 09 June 2014 - 08:51 AM

So weibren thinking of adding speech the mod ?

stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#6

Posted 09 June 2014 - 10:35 AM Edited by stef538, 09 June 2014 - 10:35 AM.

and where did you got that from ? I think he wants to do some things with an integer, not something with speech recognition.


Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#7

Posted 09 June 2014 - 10:46 AM

 

Do you want it for button pressed or button down? If you want it for button down, use a timer and that code. If you want button down, use this:

BindKey(Keys.RButton, () => //Put this where your code initial runs (example in: public ScriptName() { /* code here */ } )
            {
               Apple++;
            }

 

While i am pressing the aim key, so when the player IS aiming.

 

 

So weibren thinking of adding speech the mod ?

 

Please stop with speech sh*t, or make the source yourselfe


LetsPlayOrDy
  • LetsPlayOrDy

    I'm just different...

  • Members
  • Joined: 24 Aug 2013
  • None

#8

Posted 09 June 2014 - 12:17 PM

 

 

Do you want it for button pressed or button down? If you want it for button down, use a timer and that code. If you want button down, use this:

BindKey(Keys.RButton, () => //Put this where your code initial runs (example in: public ScriptName() { /* code here */ } )
            {
               Apple++;
            }

 

While i am pressing the aim key, so when the player IS aiming.

 

 

So weibren thinking of adding speech the mod ?

 

Please stop with speech sh*t, or make the source yourselfe

 

 

Ok then a timer would work, I think. Just try it with the interval as 1 or something. Needs to be small.

  • Wiebrendh likes this

Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#9

Posted 09 June 2014 - 03:59 PM

Did not work as i wanted to, now doing it in totally different way, thanks for the help :)

  • LetsPlayOrDy likes this

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#10

Posted 10 June 2014 - 12:36 AM

Plz dont get angry i am going to :(

LetsPlayOrDy
  • LetsPlayOrDy

    I'm just different...

  • Members
  • Joined: 24 Aug 2013
  • None

#11

Posted 10 June 2014 - 01:24 AM

Plz dont get angry i am going to :(

 

You are angry at yourself?


Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#12

Posted 10 June 2014 - 01:45 AM

I am telling weibren man.....

Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#13

Posted 10 June 2014 - 07:48 AM

I am telling weibren man.....

 

I am not angry, it is just annoying, because you make copy a mod, say YOU made it but you just copied it. And now you are asking every person on this forum if  he is going to add speech to something that cant even use speech

  • stef538 likes this

LetsPlayOrDy
  • LetsPlayOrDy

    I'm just different...

  • Members
  • Joined: 24 Aug 2013
  • None

#14

Posted 10 June 2014 - 01:03 PM

 

I am telling weibren man.....

 

I am not angry, it is just annoying, because you make copy a mod, say YOU made it but you just copied it. And now you are asking every person on this forum if  he is going to add speech to something that cant even use speech

 

 

I don't get why he just doesn't stop asking


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#15

Posted 10 June 2014 - 01:46 PM

me neither.. he is really annoying..

  • Wiebrendh likes this

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#16

Posted 10 June 2014 - 02:02 PM

Sorry guys but i am getitng complains that weibren hes is very agressive

Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#17

Posted 10 June 2014 - 02:33 PM

Sorry guys but i am getitng complains that weibren hes is very agressive

 

I am not agressive, i am not mad, but you are just very very very annoying with you speech mod.. First make the speech mod yourselfe before stalking everybody with it.


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#18

Posted 10 June 2014 - 02:39 PM

Sorry guys but i am getitng complains that weibren hes is very agressive

 

I laughed very, very, very hard at this. sorry.


Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#19

Posted 10 June 2014 - 02:39 PM

Man other people tell me as now i am not ur frnd anymore as its in your behaviour and lets say drop the speech thing

Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#20

Posted 10 June 2014 - 02:54 PM

 

Sorry guys but i am getitng complains that weibren hes is very agressive

 

I laughed very, very, very hard at this. sorry.

 

 

Hahahhaha same :D 

  • stef538 likes this

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#21

Posted 10 June 2014 - 03:00 PM

Okay okay not justice in this world :( ¡¿¡¿》¡ 😡

Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#22

Posted 10 June 2014 - 03:14 PM Edited by Wiebrendh, 10 June 2014 - 03:15 PM.

You just dont get it

  • stef538 likes this

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#23

Posted 10 June 2014 - 03:16 PM

Oooo i wwas saying.about the speech thing

Ricebox
  • Ricebox

    Mommy

  • Members
  • Joined: 13 Sep 2013
  • None

#24

Posted 10 June 2014 - 03:17 PM

I saw the title of this post and got all excited thinking it was a release and I was in the Showroom. My heart is sad now.

 

 

You just dont get it

To be fair, I just don't think he understands English that well. That's not like a jab at him I just mean like

 

Man other people tell me as now i am not ur frnd anymore as its in your behaviour and lets say drop the speech thing

Okay okay not justice in this world :( ¡¿¡¿》¡

what does this even mean?


Wiebrendh
  • Wiebrendh

    Beginning C# programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#25

Posted 10 June 2014 - 03:19 PM

I saw the title of this post and got all excited thinking it was a release and I was in the Showroom. My heart is sad now.

 

 

You just dont get it

To be fair, I just don't think he understands English that well. That's not like a jab at him I just mean like

 

Man other people tell me as now i am not ur frnd anymore as its in your behaviour and lets say drop the speech thing

Okay okay not justice in this world :( ¡¿¡¿》¡

what does this even mean?

 

He said to me that is second language is english.. Well apparently not 


Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#26

Posted 10 June 2014 - 03:21 PM

3rd it is




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users