Saving multiple strings
#7

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!


Yes, it is possible.

You have to create a global variable:
PHP код:
new AllCommands[MAX_PLAYERS][100]; 
Now, you can save 100 Commands (so the params) for each user.

Do you know how you save this?
Here is a solution:
PHP код:
//in the command
for(new i;i<100;i++)
{
    if(
strlen(AllCommands[playerid][i]) > 0)continue;
    
format(AllCommands[playerid][i],128,params);
    break;

- Mencent
Ah finally, This is great and to retrieve it to like sendclientmessage(playerid etc it (I know spam) would be the same kinda as how you would save it?

Maybe something like:

PHP код:
for( new i;50i++ ) 
    { 
       if(
rawrs[playerid][i] != ) { 
           
format(stringsizeof(string), "%s"rawrs[playerid][i]); 
           
SendClientMessage(playeridCOLORstring); 
           } 
    } 
Would that work?
Reply


Messages In This Thread
Saving multiple strings - by Glenn332 - 19.07.2015, 13:42
AW: Saving multiple strings - by BigBrainAFK - 19.07.2015, 13:44
Re: Saving multiple strings - by Glenn332 - 19.07.2015, 13:49
Re: Saving multiple strings - by Glenn332 - 20.07.2015, 14:36
Re: Saving multiple strings - by Glenn332 - 21.07.2015, 12:44
AW: Re: Saving multiple strings - by Mencent - 21.07.2015, 14:25
Re: AW: Re: Saving multiple strings - by Glenn332 - 21.07.2015, 14:37
AW: Saving multiple strings - by Mencent - 21.07.2015, 16:26

Forum Jump:


Users browsing this thread: 2 Guest(s)