[y_commands] /commands loop..
#6

Yeah, I understand that but what I don't understand is how to format the string depending on how many commands are available?

Right now I end up with having the last line in my /commands like this:
pawn Код:
/veh / / / /
because the format looks like:
pawn Код:
/%s /%s /%s /%s /%s
So basically, I just need to know how to ADD info to a string depending on how many commands there is on the last line. E.g.

pawn Код:
if(buffer[0]) { AddToString(str,"/%s",buffer[0]) } else {return 1;}
if(buffer[1]) { AddToString(str,"/%s",buffer[1]) } else {return 1;}
if(buffer[2]) { AddToString(str,"/%s",buffer[2]) } else {return 1;}
if(buffer[3]) { AddToString(str,"/%s",buffer[3]) } else {return 1;}
if(buffer[4]) { AddToString(str,"/%s",buffer[4]) } else {return 1;}
EDIT: I searched wiki and found "Strins" would that work?
Reply


Messages In This Thread
[y_commands] /commands loop.. - by introzen - 29.06.2013, 07:43
Re: [y_commands] /commands loop.. - by introzen - 29.06.2013, 10:27
Re: [y_commands] /commands loop.. - by IstuntmanI - 29.06.2013, 10:29
Re: [y_commands] /commands loop.. - by introzen - 29.06.2013, 10:41
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:01
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:14
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:36
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:44
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)