14.03.2015, 21:41
You can use common string functions such as strdel, strpos, etc.
For instance,
This would get everything after "Question" and extract it into the string. You'll need to specify a MAX_SIZE where it will stop extracting the string at.
For instance,
pawn Code:
stock get_question_answer()
{
new string[64] = file_get_contents("file.cfg");
if(strfind(string, "Question") != -1)
{
strmid(string, strpos(string, strfind(string, "Question"), strfind(string, "Question"+MAX_SIZE), sizeof(string));
}
return string;
}