I use strtok, but it's outdated. I suggest you do not use it, use sscanf instead. But if you still want to use it then let me explain, strtok is out dated so you need to define the stock function yourself, you can find it at the
https://sampwiki.blast.hk/wiki/Strtok. It is used to find words before a spacing(including the spacing if I'm not wrong) then stores the character number after the spacing in the index variable you created(second argument). Therefore, first you get "/help ", then use strtok again with the index value of the last spacing and you will get the words after "/help "
pawn Код:
new index, cmd[10], data[100];
cmd = strtok(cmdtext, index); //Will return "/help " then save the next character's index in the index variable
data = strtok(cmdtext, index); //Start returning from the defined character index
Take note if the data after /help cannot have spacing or else it will return only the ones before the spacing
I'm not sure what I'm writing is right because that's from what I have been observing. I asked the same question before, people here gave me all kinds of weird codes that made me gave up on using command with data and use dialog instead but then I found strtok. I couldn't find a proper tutorial for sscanf and was confused with it so I didn't want to use it, strtok works fine for me. We both got confused with the same thing, I hope this prevents you from getting the same faith like I did