Results 1 to 7 of 7

Thread: [CoD2] If user press F then sprint

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Private
    Join Date
    Nov 2019
    Posts
    22
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Ummm sadly I don't using libcod yet. But I trying to figure out.

    It seems to work fine but I'm not sure that's the right way and if I'm die while sprinting then I have infinite sprint so the g_speed cvar isn't change back.

    PHP Code:
    init()
    {
    self endon("disconnect");

    while(
    1)
    {
        if(
    self useButtonPressed())
        {
        
    self endon("death");
        
    self setclientcvar("g_speed","300");
        
    self iprintlnBold("Sprint activated!!");
        
    wait 10;
        
    self setclientcvar("g_speed","190");
        
    wait 20;
        }
    }


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

    kung foo man (2nd November 2020)

Tags for this Thread

Posting Permissions

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