View Single Post
Author Message
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 02-22-2017 , 04:24   Trigger function with % chance
Reply With Quote #1

I want function to be triggered with 5% chance but I'm getting error

PHP Code:
number of arguments doesn't match definition 
So what I'm doing (or at least I think it should do like that)
Every round start it gets a random number from 1 to 100 if number is equal or below 5 then it does CmdKnifeRound

PHP Code:
public RoundStart() {
    if(
random_num1100) <= 5) {
        
CmdKnifeRound;
    }

Any help?
__________________
Airkish is offline