What;s a better way to do this?
#9

What Jefff said, or:
pawn Код:
stock const szMonthNames[12][10] =
{
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December"
};

// Somewhere in a function:
new szMessage[48];
format(szMessage, 48, "Month name: %s", szMonthNames[--Player[playerid][bMonthNumber]]);
You said you wanted it without a stock.
I propose this way over any other, it's the fastest, but be careful that "bMonthNumber" is an integer between 1..12 (and also never 0!)
and if it's not you shouldn't execute the code I posted as an example.
Reply


Messages In This Thread
What;s a better way to do this? - by sammp - 14.07.2014, 20:18
Re: What;s a better way to do this? - by Emmet_ - 14.07.2014, 20:25
Re: What;s a better way to do this? - by Patrick - 14.07.2014, 20:26
Re: What;s a better way to do this? - by sammp - 14.07.2014, 20:44
Re: What;s a better way to do this? - by Patrick - 14.07.2014, 20:45
Re: What;s a better way to do this? - by sammp - 14.07.2014, 20:50
Re: What;s a better way to do this? - by Hirsw0w - 14.07.2014, 22:16
Re: What;s a better way to do this? - by Jefff - 14.07.2014, 22:25
Re: What;s a better way to do this? - by Virtual1ty - 14.07.2014, 22:41
Re: What;s a better way to do this? - by sammp - 14.07.2014, 22:51

Forum Jump:


Users browsing this thread: 1 Guest(s)