AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [csgo] define percentage to play sound (https://forums.alliedmods.net/showthread.php?t=330332)

drespy 01-29-2021 20:47

[csgo] define percentage to play sound
 
I need a solution when playing a sound to have 10% chance and another with 90% to play, using if and else

Equiment 01-30-2021 00:03

Re: [csgo] define percentage to play sound
 
HTML Code:

if(GetRandomInt(1, 10) == 1) {
    // Play sound here
}



All times are GMT -4. The time now is 08:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.