Results 1 to 10 of 34

Thread: Weapon functions (+ setMoveSpeedScale)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Reloadtime, firetime and melee time maybe?

  2. The Following User Says Thank You to Ni3ls For This Useful Post:

    Mitch (7th March 2015)

  3. #2
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    Reloadtime, firetime and melee time maybe?
    I tried firetime, but i don't get the exact values as in the weapon files back and when i change the value it bugs your weapon. Also it has no affect on your fire speed.

    Edit: read value: 7.00649e-44, actual firetime: 0.05.
    Edit 2: It looks like firetime is not a float, but a integer.
    Edit 3: it works now. CoD2 saves firetime multiplied by 1000. So 0.05 is 50.

    http://classic.xfire.com/video/6335c5/

    PHP Code:
    sayOrUpdateFireTime(args)
    {
        if(
    args.size >= 3// say !firetime time
        
    {
            
    firetime Int(args[2]);
            
    maps\mp\gametypes\_weapons::setWepFireTime(self getCurrentWeapon(), firetime);
        }
        else
        {
            
    firetime maps\mp\gametypes\_weapons::WeaponFireTime(self getCurrentWeapon());
            
    maps\mp\gametypes\_util::tellMessage("FireTime: " firetime);
        }

    PHP Code:
    WeaponFireTime(weapon)
    {
        
    id getWeaponId(weapon);
        if(
    id == -1)
            return 
    0;
        
        return 
    getweaponfiretime(id);
    }

    setWepFireTime(weapontime)
    {
        
    id getWeaponId(weapon);
        if(
    id == -1)
            return 
    0;
        
        return 
    setweaponfiretime(idtime);

    Last edited by Mitch; 7th March 2015 at 11:13.

  4. The Following 3 Users Say Thank You to Mitch For This Useful Post:

    filthy_freak_ (19th May 2015),kung foo man (8th March 2015),Ni3ls (7th March 2015)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •