Multidimensional Array
#1

So I was planning to create an array for the messages of 4 textdraws

PHP код:
static const Msgs[][2][50] = //[] is for the id, [2] is to declare a multidimensional array, [50] is the maxlength of the string
{
    {
"Together forever!"1},
    {
"Long live!"2},
    {
"Test Server"3},
    {
"It's a great day!"4}
};
//the second values (numerical ones) are the ids of the textdraw 
And I was trying to create a command that would pick out the message and the textdraw id it's assigned to

PHP код:
CMD:findmsg(playeridparams[])
{
    new 
msg[64];
    if(
sscanf(params"s"msg))
    {
        
SendClientMessage(playerid, -1"USAGE: /findmsg [part of word]");
        return 
1;
    }
    return 
1;

That's as far as I can go in the command. dunno how to pick out something from the array with just a part of its word

Tryna' learn how Multidimensional arrays work =)
Reply


Messages In This Thread
Multidimensional Array - by NealPeteros - 14.09.2018, 10:59
Re: Multidimensional Array - by v1k1nG - 14.09.2018, 11:00
Re: Multidimensional Array - by NealPeteros - 14.09.2018, 11:17
Re: Multidimensional Array - by Shinja - 14.09.2018, 11:19
Re: Multidimensional Array - by AmirSavand - 14.09.2018, 12:02
Re: Multidimensional Array - by NealPeteros - 14.09.2018, 12:54
Re: Multidimensional Array - by v1k1nG - 14.09.2018, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)