Need help with strings.
#1

Hi,

I wanted to ask how i could split my string. For example: The string looks like this: Test1 | Test 2 | Test 3 | etc..
So i want to split this string. Everytime it finds an "|" it should return the text before the "|".

So it would look like this:

SendClientMessage(playerid, COLOR, "Test1");
SendClientMessage(playerid, COLOR, "Test2");
SendClientMessage(playerid, COLOR, "Test3");

etc..

Hope you can help me.
Reply
#2

https://sampwiki.blast.hk/wiki/Code_Snippets#Split
Reply
#3

pawn Код:
sscanf(stringName, "p<|>s[length]s[length]s[length]", var1, var2, var3);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)