22.04.2012, 05:40
Alright, so I am trying to figure out how to remove a word or something from a string.
I thought strdel may help, but what if I don't know the length of the string say if I had a list say,
1|2|3|4|5| and I wanted to delete both the 3|, how could I go around with doing it?
Searching the script only searches but how would I search where in the string it is.
So we have string which has been formatted with "1|2|3|4|5|"
I know from looking at that you would probably say Use strdel(string, 5, 6);
But no, im not just using 1|2|3|4|5|
I have it for weapon ids so it saves the weapon ids to a file, such as:
27|29|31|38|
And when I add a weapon it adds to the list, what I wanna do is when I remove the weapon id with a command, it removes it from the file.
How would I go about with this?
Since the contents of the file load into string.
Not using ini system.
Using Default file system.
I thought strdel may help, but what if I don't know the length of the string say if I had a list say,
1|2|3|4|5| and I wanted to delete both the 3|, how could I go around with doing it?
Searching the script only searches but how would I search where in the string it is.
So we have string which has been formatted with "1|2|3|4|5|"
I know from looking at that you would probably say Use strdel(string, 5, 6);
But no, im not just using 1|2|3|4|5|
I have it for weapon ids so it saves the weapon ids to a file, such as:
27|29|31|38|
And when I add a weapon it adds to the list, what I wanna do is when I remove the weapon id with a command, it removes it from the file.
How would I go about with this?
Since the contents of the file load into string.
Not using ini system.
Using Default file system.