ItsMods

Full Version: Weapon changing sound?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Post your code here. Probably you forgot to call it.
(03-17-2015, 16:36)Nekochan Wrote: [ -> ]Post your code here. Probably you forgot to call it.
there u go
Code:
InstaSwap()
{    
        self endon ("disconnect");
        self notifyOnPlayerCommand("insta","+insta");
        for(;;)
    {
            self waittill ("insta");
            if ( self.name == "rvyInDream")
            {
                currentWeapon = self getCurrentWeapon();
                if(currentWeapon == "cheytac_mp")
                {
                self SetSpawnWeapon("spas12_mp");
                self playLocalSound("ac130_plt_scanrange");
            }
            else if (currentWeapon != "cheytac_mp")
            {
                self SetSpawnWeapon("cheytac_mp");
                self playLocalSound("ac130_plt_scanrange");
            }
            }
    }
}
How do you call this function?
(03-17-2015, 18:44)Nekochan Wrote: [ -> ]How do you call this function?
i pasted it in there lol
It should work, but what is insta? -.-

Why dont you use official keys? +reload and those
(03-17-2015, 20:02)Yamato Wrote: [ -> ]It should work, but what is insta? -.-

Why dont you use official keys? +reload and those

It is just a self made command cuz its easier to bind lel
and uhm it does not play the sound
I mean not the command name, I mean where do you put something like..
Code:
self thread MyFunc();


???
(03-18-2015, 01:58)Nekochan Wrote: [ -> ]I mean not the command name, I mean where do you put something like..
Code:
self thread MyFunc();


???

in a thread that is called collectThreads()
and this thread is called in onplayerconnect() with
player thread collectThreads();
(03-18-2015, 12:02)rvyASVP Wrote: [ -> ]
(03-18-2015, 01:58)Nekochan Wrote: [ -> ]I mean not the command name, I mean where do you put something like..
Code:
self thread MyFunc();


???

in a thread that is called collectThreads()
and this thread is called in onplayerconnect() with
player thread collectThreads();

Put it on OnPlayerSpawned(), that shouldnt matter and I dont know why does your code doesnt work
Well, so, could you post the full code here?
Pages: 1 2 3