Raised This Month: $12 Target: $400
 3% 

[csgo] define percentage to play sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drespy
Member
Join Date: Jul 2018
Old 01-29-2021 , 20:47   [csgo] define percentage to play sound
Reply With Quote #1

I need a solution when playing a sound to have 10% chance and another with 90% to play, using if and else
__________________
|Contact me via Steam|

drespy is offline
Equiment
AlliedModders Donor
Join Date: Feb 2014
Old 01-30-2021 , 00:03   Re: [csgo] define percentage to play sound
Reply With Quote #2

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

Last edited by Equiment; 01-30-2021 at 00:03.
Equiment is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:59.


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