Function help
#8

Quote:
Originally Posted by ComDuck
View Post
Code:
switch(APlayerData[playerid][StatsTruckerJobs])
{
    case 0..14: // StatsTruckerJobs >= 0 && StatsTruckerJobs <= 14
    {
        // foo
    }
    case 15..49: // StatsTruckerJobs >= 15 && StatsTruckerJobs <= 49
        // foobar
    }
}
Although, do note that using switch statement for number ranges at three digit range values (case 400..600, etc) and above is much slower than using the equivalent if-else statement.
Thank you, repped.
Reply


Messages In This Thread
Function help - by Proxus - 09.02.2019, 12:12
Re: Function help - by ComDuck - 09.02.2019, 12:16
Re: Function help - by TokicMajstor - 09.02.2019, 12:22
Re: Function help - by Proxus - 09.02.2019, 12:35
Re: Function help - by ComDuck - 09.02.2019, 12:40
Re: Function help - by Proxus - 09.02.2019, 12:41
Re: Function help - by ComDuck - 09.02.2019, 12:50
Re: Function help - by Proxus - 09.02.2019, 12:54

Forum Jump:


Users browsing this thread: 1 Guest(s)