06.05.2012, 10:08
Damn, thank you for that. (@Slice). Works perfect, and it's gonna be very usefull for my gamemode : ).
Just tested it, and it worked like.... a script that works good.
A bit of a dumb string, but it's nice to see how it works : )
Just tested it, and it worked like.... a script that works good.
pawn Код:
main()
{
new string[100];
string = "* Kevin the noob is dumb *";
printf("%s", string);
strreplace(string, "Kevin", "Kwarde");
strreplace(string, "*", ">>", .limit = 1);
strreplace(string, "*", "<<", .pos = 1);
strreplace(string, "dumb", "just a regular scripter");
strreplace(string, "noob", "PAWN scripter");
printf("%s", string);
return 1;
}
/*
** Output **
[12:15:24] * Kevin the noob is dumb *
[12:15:24] >> Kwarde the PAWN scripter is just a regular scripter <<
** End Of Output **
*/

