04.12.2011, 05:38
I feel really stupid because this seems like such a simple thing to do, yet I can't find a way to do it!
Anyways, for example I have the name "Russell_Rhodes" and I want to extract "Russell" and store that into a variable (i.e. gFirstName[playerid]) and then do the same with "Rhodes" (i.e. gLastName[playerid]). Of course, I am obtaining a player's name and will need to work from just figuring out what's before (and after) the underscore. How could I do that?
Anyways, for example I have the name "Russell_Rhodes" and I want to extract "Russell" and store that into a variable (i.e. gFirstName[playerid]) and then do the same with "Rhodes" (i.e. gLastName[playerid]). Of course, I am obtaining a player's name and will need to work from just figuring out what's before (and after) the underscore. How could I do that?