Results 1 to 4 of 4
  1. #1
    ulionx's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Can anyone take a look at this piece of code?

    I´m in the process of making a mod for mw2 specifically for moviemaking, I need to have a toggle slowmotion option and one for suiciding. But the mw2 client cant start the mod cause of syntax errors, and its this part of code that´s doing it. I´ve checked all the brackets and i dont spot any mistakes, hopefully you guys can help out further.

    Code:
    slowMotion()
    {
    	self endon("disconnect");
    	self notifyOnPlayerCommand("as1", "+actionslot 1");	
    	
    	for(;;)
    	{
    		self waittill("as2");
    		if (getdvar("timescale")=="1") {
    			setDvar("timescale", "0.25");
    		} else if (getdvar(("timescale")==0.25) {
    			setDvar("timescale", "1");
    		}
    	}
    }
    
    
    killSelf()
    {
    	self endon("disconnect");
    	self endon("death");
    	self notifyOnPlayerCommand("as2", "+actionslot 2");
    	
    	for(;;)
    	{
    		self waittill("as2");
    		self suicide();
    	}
    }
    I put the code in _rank.gsc btw, under the onPlayerSpawned thread if that helps out in figuring this out.
    Last edited by ulionx; 04-04-2014 at 10:04 PM.

  2. #2
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,940
    Reputation
    574
    Thanks
    5,004
    My Mood
    Twisted
    Which line is giving an error ? Clients like RepZ give you this information, and it's extremely usefull
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  3. #3
    silentNQQB's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    147
    Reputation
    26
    Thanks
    10
    My Mood
    Relaxed
    First of all, have you called the threads on DoDvars() or onPlayerSpawned()
    With self thread SlowMotion()?

  4. #4
    MrMatrix220's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    try to change SlowMotion() for ActiveSlowMotion()

Similar Threads

  1. Can you take a look at this please and review it ?
    By D e a t h h a u n t S in forum General Game Hacking
    Replies: 1
    Last Post: 01-09-2011, 11:54 AM
  2. CA:Take a look at this
    By GreekSneak75 in forum Combat Arms Hacks & Cheats
    Replies: 22
    Last Post: 08-22-2009, 06:46 PM
  3. Can anyone make a hack for this game?
    By juromaru in forum General Hacking
    Replies: 2
    Last Post: 04-23-2009, 02:24 PM
  4. Can anyone make a hack for this game?
    By juromaru in forum Programming Tutorial Requests
    Replies: 0
    Last Post: 04-23-2009, 02:12 PM
  5. TAKE A LOOK AT THIS AND TELL ME WHAT IT IS
    By bigbadwolf in forum Combat Arms Europe Hacks
    Replies: 17
    Last Post: 04-19-2009, 02:09 PM